Nick Brown
Nick Brown

Reputation: 1167

Git post-receive Host Key verification failed

Have 3 servers: Local, Bare, Development.

The following workflow works perfectly:

1. Make my local changes 
2. git push to Bare 
3. ssh into Bare 
4. $ ssh ip.of.Development.server "cd /path/to/Development/repo; git pull"

This does exactly what you would expect, content gets pulled to my Development server, displays on the page, all is well.

However, if I move the last line to my hooks/post-receive file on Bare, I get a

remote: Host key verification failed.

I can ssh from Development to Bare without issue and without using a password (after I set up an RSA pair).

Upvotes: 1

Views: 414

Answers (1)

Mark Leighton Fisher
Mark Leighton Fisher

Reputation: 5693

As I understand SSH, it is not commutative -- Development can know about Bare (Development can have Bare's public key) while Bare can be ignorant of Development (Bare does not have Development's public key).

I would verify that Bare is set up correctly for SSH to Development.

Upvotes: 1

Related Questions