Issues with SSH connect Stash and Jenkins

I followed the instructions here: http://nerdwin15.com/2013/04/continuous-integration-with-stash-and-jenkins/

I Have jenkins and stash "connected" however the current probelm is that running the builds hangs at fetching the repo...

Fetching upstream changes from ssh://git@git.xyz.com:7999/gp/gp-xyz.git

FATAL: Failed to fetch from ssh://git@git.xyz.com:7999/gp/gp-xyz.git hudson.plugins.git.GitException: Failed to fetch from ssh://git@git.xyz.com:7999/gp/gp-xyz.git

So from what I gather the problem is that if i run this command on jenkins (which is running on windows)..Is the fact that I have to enter a password here when i run this test command:

$ git clone ssh://git@git.xyz.com:7999/gp/gp-xyz.git Cloning into 'gp-xyz'... Enter passphrase for key '/c/Documents and Settings/userMe/.ssh/id_rsa':

How can i configure windows to store the ssh key so that I can clone like the build server does? Or configure jenkins or stash to use http?

What i tried is:

userMe@jenkins /C $ ssh -T git@git.xyz.com:7999 ssh: git.xyz.com:7999: no address associated with name

userMe@jenkins /C $ ssh -T git@git.xyz.comgit@git.xyz.com's password: Permission denied, please try again. git@git.xyz.com's password:

However, This confuses me. Because a) Stash is running on port 7999 and b) there is no actual user named git on stash but it wont let me change that in the Stash WebHook to Jenkins Plugin

1 answer

1 accepted

It looks like you've setup the Jenkins SSH key to have a passphrase (this would cause the "hang" that you mention when cloning from Jenkins). You'll want to either have a key without a passphrase (which needs to be in the .ssh directory of the user which Jenkins runs as), or setup the Jenkins Git configuration to use a credential where you've got the passphrase associated with the SSH key.

Using HTTP would also work if you allow anonymous access to the repository.

Ended up just using Http so thanks for the idea

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted yesterday in Off-topic

Miscellaneous Monday - CreatatronV3

You may remember, not so long ago, that together we invented the most evil of machines: The Destructo5000!  The effects of missing Durian rippled over nations. Complete chaos as goat chee...

105 views 4 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you