AWS EC2 Linux AMI buildAgent permission denied
I am trying to run a remote build agent on an AWS EC2 running Amazon Linux AMI. When the build agent runs I get..
On the linux client I get:
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/ec2-user/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Trying private key: /home/ec2-user/.ssh/id_dsa
debug1: Trying private key: /home/ec2-user/.ssh/id_ecdsa
debug1: Trying private key: /home/ec2-user/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
I have tried ssh-keygen to create new keys and adding that private key to the git user account that performs the checkout with no luck.
Please sign in to leave a comment.
Could you please check whether you can connect manually from those VMs to the git server? (move to the same folder, run git clone/fetch/pull, preferably under the same user)
If it does work, please enable VCS debug on the agent (edit the <Build Agent home>/conf/teamcity-agent-log4j.xml file and change
to
Then run a build that replicates the issue and send us the agent's teamcity-vcs.log file.
Thanks for the answer but the question was many days ago. I couldn't figure out what the problem was so I nuked the instance in AWS and spawned a new one, the problem went away.