jenkinsci / jenkinsci/git-client-plugin

[JENKINS-30927] 'C:\Program' is not recognized as an internal or external command

Open
#1,495 25 comments 0 reactions 0 assignees View on GitHub
component:git-client-plugin imported-jira-issue priority:critical resolution:unresolved
Dominant language
Java
Stars
152
Forks
402
Avg merge
6h 47m
Merged PRs (30d)
4

Description

I tried to setup a test project, using a git project connecting through ssh.

After selecting the ssh credential and adding the git URL (ssh://git@​bitbucket.org/CLIENT/test.git) I get the following message:

---------------

Failed to connect to repository : Command "C:/Progra~1/Git/bin/git.exe -c core.askpass=true ls-remote -h ssh://git@​bitbucket.org/CLIENT/test.git HEAD" returned status code 128:

stdout:

stderr: 'C:\Program' is not recognized as an internal or external command,

operable program or batch file.

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

--------------

My setup:

Jenkins: 1.633

GIT client plugin: 1.19.0

GIT plugin: 2.4.0

Jenkins Git Configuration is set to: C:/Progra~1/Git/bin/git.exe

Git 2.6.1 from https://git-scm.com/downloads.

---
Originally reported by flaviodonze, imported from: 'C:\Program' is not recognized as an internal or external command


  • status: Open
  • priority: Critical
  • component(s): git-client-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 6
  • imported: 20251211-071809

Raw content of original issue

I tried to setup a test project, using a git project connecting through ssh.
After selecting the ssh credential and adding the git URL (ssh://git@bitbucket.org/CLIENT/test.git) I get the following message:
---------------
Failed to connect to repository : Command "C:/Progra~1/Git/bin/git.exe -c core.askpass=true ls-remote -h ssh://git@bitbucket.org/CLIENT/test.git HEAD" returned status code 128:
stdout:
stderr: 'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
--------------

My setup:
Jenkins: 1.633
GIT client plugin: 1.19.0
GIT plugin: 2.4.0

Jenkins Git Configuration is set to: C:/Progra~1/Git/bin/git.exe
Git 2.6.1 from https://git-scm.com/downloads.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.