Looking for TeamCity's Commands (Stack Trace) for Fetching Code from VCS

Hi all,

Problem:
I have inherited a TeamCity project that is not building. I need to figure out why.  It used to work fine.  I don't beleive anything in the configuration of TeamCity has changed.

Background:
TeamCity is installed on our windows server.  The build is performed on another SUSE Linux Build Server.  The VCS Repository is on yet another SUSE linux GIT server.  The build agents on the buiId server and windows server look like they are enabled, authenticated, and all working fine.    I believe the problem lies within retriving the code from our GIT VCS server.  I figured if I could see the exact commands that TeamCity is using to retrieve the code, that would be a good start.

Error messages
see attached image.

Analysis:
The error message in red indicates a credential issue -as in wrong password, or something.  However, if you look at my VCS configuration (see attached), I don't use a password authentication to retrieve data from my git repository.  Everything is authenticated using SSH keys.  So this is puzzling.  And remember, everything worked before.  Nothing in our configuration has changed,  I thought if I could manually enter the TeamCity commands from my SUSE linux terminal, then I can see exactly where things got stuck in TeamCity when I try an do a build.  Looking at the stack trace of the error, the lines:
          org.eclipse.jgit.errors.UnsupportedCredentialItem: ssh://OPTISCAN\\swdeveloper@vmBldsvr:22: Password:  
           at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.java:134)
indicate that perhaps something prompted for a password, and didn't get the right one or something.  But again, using an SSH authentication key, shouldn't passwords be avoided all together?  I wish the error was more speciific, like wrong password, or corrupt or incorrect SSH key.  As well, what was the exact command that TeamCity used to produce this error?  I see what's entered in the "Fetch URL" field, but that doesn't tell me what is the full command TeamCity is using to retrieve the data from the repository.  Note, I have successfully retrieved code manually with my own account on the linux build server using "git clone ssh://...", so our GIT repository seems to be working fine and allowing SSH access to it.

Thanks in advance for any help.
Will



Attachment(s):
TeamCityErrorMsg.jpg
TeamCityVCS config.jpg
3 comments
Comment actions Permalink

Hi Will,

Do you use server-side or agent-side checkout mode?

Did you specify a password for the git server machine?

0
Comment actions Permalink

Hi Alina,

I'm not sure where server-side or agent side checkout mode is set.  (I am using TeamCity version 7.15) Where would this be set?

Also, TeamCity does not allow me to enter a password when I set the authentication method to be using default private key.

Any suggestions?

Thanks,
Will

0
Comment actions Permalink

Hi Will,

please check if you can access the server using the ssh key specified in VCS root. To do that please run the following command on the TeamCity server machine under the user who runs TeamCity:

git ls-remote ssh://OPTISCAN\\swdeveloper@vmBldsvr:22/<rest of the url from VCS root>

Does git ask for a password?

I think you can get the error about password in 2 cases: either ssh keys is protected with a passphrase or your git server doesn't authenticate the key and falls back to a password authentication. In first case you need to change VCS root settings so that it uses a custom ssh key with given passphrase. In the second case you need to register the private key from TeamCity server in your git server.

0

Please sign in to leave a comment.