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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"You'll need to upload the public key that Bamboo"
How do I find out which key Bamboo is using?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
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.
https://confluence.atlassian.com/display/BAMBOO/Git
Cheers,
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
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.
https://bitbucket.org/atlassian/git-client-debug/
Cheers,
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Saved.
Added a Git checkout task to the Default stage.
Saved.
Then Run Plan.
The result is the error I mentioned in the primary question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
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.
Cheers,
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Re-checked the SSH URL from Stash and all is correct.
I omitted the UUID to save on real estate.
EDIT the Path for Executable Git is incorrect. I was getting a bit desperate during my debugging session.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
I don't feel like we're getting anyway, and we'd like to help. If you haven't already please raise a support ticket so we can arrange a screensharing session to help you resolve this issue.
Cheers,
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which version of Bamboo is it?
Older versions have problems if the temp directory contains a space in its name. Try creating c:\somedir and passing -Djava.io.tmpdir=c:\somedir to you Bamboo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.