I have bamboo and Stash on the same Windows Server 2008 machine. Bamboo on port 8085 and Stash on 7990.
Bamboo service is running as one user whil Stash runs as another.
I've tried installing GIT for Windows, cygwin for ssh, .ssh/config modifications and all without success.
I just don't think bamboo is using the right keys or at least the user is not the user running the service.
Caused by: com.atlassian.bamboo.plugins.git.GitCommandException: command C:\GitStack\git\bin\git.exe ls-remote ssh://<UUID>@127.0.0.1:53634/SPEC/repo.git failed with code 128. Working directory was [.]., stderr: [Host key verification failed., fatal: Could not read from remote repository., , Please make sure you have the correct access rights, and the repository exists.]
Bamboo Version: 4.4.4 build 3506 - 28 Feb 13
Stash version: 2.2.0
I'm running trial license of stash so my time is limited.
Solved my problem. Originally, we had authenication errors and took to the interwebs for resolution. Many Atlassian Answers and Jira tickets led us to believe the built-in Git was at fault.
So we removed the suggested third-party Git from server capabilities. With the built-in Git, we were able to successfully pull code.
Stash ships with an embedded SSH server and does not use the SSH configuration of the server it's been installed on. You'll need to upload the public key that Bamboo is using to Stash (Profile > SSH Keys > Add Key).
Also make sure you use the SSH port that is listed in the SSH clone urls displayed in Stash as the Stash SSH port may differ from the default SSH port on the server.
You will need to set the authentication type and upload a private key as part of the repository information in Bamboo. The corresponding public key can then be uploaded to Stash. You may need to generate a new or separate key if you don't already have one.
Just out of curiosity using the same URL as Bamboo can you clone to your desktop or manually from the server itself? Does it give you the same error? If you do, you could possible use the following scripts to clone and attach the log file to a new support ticket.
I've done the generating. This is what I did:
From my desktop I generated a key, pasted the public key content into my profile of Stash.
Then in Bamboo created a plan with a Git repo. Chose SSH auth and uploaded my private key and entered a passcode.
Added a Git checkout task to the Default stage.
Then Run Plan.
The result is the error I mentioned in the primary question.
Yes. No, error. Locally it works fine. I can clone to my desktop and from command line of the Bamboo server. It's only when Bamboo itself does the clone does it fail.
Now I mentioned Bamboo server runs as a different user and not me. So I'm not sure which user@domain is coming across to Stash.
Sorry for the delay. I didn't have access to a computer over the weekend. I'm afraid we're not entirely sure what's going wrong. Can you triple-check that the SSH URL that you're using for Stash is exactly the same as what you used from the command line on the server. Do you mind posting that here as well. I ask because the <UUID> part of your initial question is a little concerning and not what we would expect. Maybe a screenshot of the Bamboo configuration?
If that doesn't help you're best bet to raise an actual support ticket so we can ask you to post the support zip which might shed some more light on the issue.
Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...
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!
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
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot