I use a TeamCity build agent to build code. When I built it I change a file, commit it and want to push it back. I don't want to use my password in the Build Step's command line. So, I use the SSH Exec runner type. I made a key, uploaded the public one to github and the private one to TeamCity. I see my id_rsa key is used in VCS root and in the Build agent.
I create a VCS Root: Type of VCS: Git, Fetch URL: ssh://email@example.com/repo_name.git, Username: git, Auth method: Uploaded key, Username: git, Uploaded key: id_rsa. It works, the repo clones well.
Futher I want to update another branch by hand, commit to it and push it. So, I create the build step: Authentification method: Uploaded key Target: github.com Username: git Select key: id_rsa Commands: git fetch ssh://firstname.lastname@example.org/repo_name.git master. Here I tried different urls, but nothing works with error:
Step 1/6: Update (SSH Exec)