git and agent side checkout issues
Hi,
I'm trying to execute an agent side checkout and I'm using TeamCity 6.0.3 and my vcs settings are like so:
git@github.com:brightcove/twobucks.git
Set to Default Private Key
And we get the error below:
git@github.com:brightcove/twobucks.git: Auth fail
When I go onto the agent I am able to clone the repository and also do a connect by doing ssh git@github.com, I tried adding the ssh protocol by adding "ssh://" but this seems to add an extra slash, from the log:
Cannot access repository ssh:///github.com:brightcove/twobucks.git
Any help would be great.
Thanks,
Jay
Please sign in to leave a comment.
Hi Jason,
When you use a server-side checkout we collect changes on TeamCity server, build our own VCS-agnostic patch and send it to the agent.
When you use an agent-side checkout we transfer sources directly from your repository to the agent using VCS specific capabilities (git protocol over ssh in your case). But even with agent-side checkout we need to collect changes on TeamCity server, i.e. TeamCity server should be able to access your repository. Most likely you got this error because TeamCity server doesn't have an appropriate ssh key. Could you please check that?
The checkout works on the server as that is what we were using before and since we added some perforce protected files to the build we wanted to make it use agent side checkout instead. The server has list access to the protected spaced but can't read the files which is okay but other than that it works there.
Jason,
you said you have a problem with git. Does TeamCity server has an ssh key required to clone git repository?
Hi Dmitry,
Looks like when I added the default key on the teamcity server into the github user it now works, is this because when you do agent side checkout it uses the default one back on the server? Where as when we were doing a server side checkout we were pointing to a specific key file?
Thanks,
Jay
Yes, when you do an agent-side checkout with default ssh key we use default ssh key on the server.
It seems like there are cases when this is not convenient, e.g. you want to use some custom key with passphrase on the server and default key on agent, but at the moment there is no option to do that. Feel free to create a feature request in youtrack for this case.
Thanks for your comment, saved my day. It would be really helpful if this information was on the wiki. http://confluence.jetbrains.com/display/TCD7/Git+(JetBrains)#
However, I don't have edit permission, but perhaps you do?