1

I have a build step in Team City which generates documentation which I want to commit with git and then push to GitHub.

I am using ssh to connect to GitHub and doing the following:

git add .
git commit -m "Update docs"
git push origin refs/heads/localbranch:refs/heads/remotebranch

I am getting:

Host key verification failed.
fatal: Could not read from remote repository.

Should this approach work or do I need to try something else?

  • Related: https://stackoverflow.com/questions/13363553/git-error-host-key-verification-failed-when-connecting-to-remote-repository – evolutionxbox Jun 17 '19 at 13:18
  • could you please provide more details otherwise nothing is clear. how do you add VCS? how you add ssh_keys and e.t.c. – Senior Pomidor Jun 18 '19 at 07:24
  • I created a Git vcs root using the ssh url from GitHub for fetch&push.The ssh key was generated on the server and added through the "Upload ssh keys" menu in Team City – Jonas Røineslien Jun 18 '19 at 08:51

1 Answers1

0

It seems that you are missing the host key or the host key has changed. See:SSH connection problem with “Host key verification failed…” error

scro
  • 155
  • 1
  • 7