Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable Pull Code from Stash

John Giotta March 13, 2013

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.

3 answers

1 accepted

0 votes
Answer accepted
John Giotta March 19, 2013

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.

0 votes
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2013

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.

John Giotta March 14, 2013

"You'll need to upload the public key that Bamboo"

How do I find out which key Bamboo is using?

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 15, 2013

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

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 15, 2013

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

John Giotta March 15, 2013

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.

John Giotta March 15, 2013

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.

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 17, 2013

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

John Giotta March 17, 2013

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.

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 18, 2013

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

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 13, 2013

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.

John Giotta March 13, 2013

4.4.4 build 3506 - 28 Feb 13

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events