I am trying to configure Jenkins to work with Atlassian Stash. I have gotten as far as (apparently) getting the Git plugin to successfully ping Stash, as there are no longer any error messages from the Git plugin page. I am using Git with SSH, and I have configured my Stash account with the correct SSH key. I should also mention that my office is behind a firewall, hence the proxy server for Stash. Here is a screenshot of the Jenkins Git configuration:
The console output indicates failure after the default 10 minute timeout. Here is what the console output says:
> C:\Program Files (x86)\Git\bin\git.exe fetch --tags --progress ssh://git@stash.someproxy.com:7999/project/myrepo.git
+refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "C:\Program Files (x86)\Git\bin\git.exe fetch --tags --progress ssh://git@stash.someproxy.com:7999/project/myrepo.git +refs/heads/*:refs/remotes/origin/*" returned status code -1:
stdout:
stderr:
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn
...
When I run the following Git command directly from the Windows bash, it completes quickly, although there is no output:
$ time git fetch --tags --progress
ssh://git@stash.someproxy.com:7999/pcb_imst/
wigbotsimulator.git +refs/heads/*:refs/remotes/origin/*
real 0m5.530s
user 0m0.093s
sys 0m0.062s
Also, when I remove the credentials from Jenkins and try to build, I get an authentication error almost immediately (Permission denied (publickey)
). So it definitely seems that Jenkins can hit Stash, though it does not appear to be able to complete a fetch.
I am out of ideas on how to fix this. It is strange that Git works locally but does not work when Jenkins uses it.