I have a script that uses SSH to pull the latest repo from bitbucket.org to a remote server.
ssh -t -t -p 722 <server-credentials> <<'ENDSSH'
cd <path-to-server-repo>.git
git fetch -vvv ssh://git@bitbucket.org/<path-to-bitbucket-repo>.git master
git --work-tree=$HOME/<path-to-work-tree> reset --hard FETCH_HEAD
ENDSSH
When it reaches the git fetch line it responds with...
The authenticity of host 'bitbucket.org (104.192.141.1)' can't be established.
ECDSA key fingerprint is SHA256:FC73VB6C4OQLSCrjEayhMp9UMxS97caD/Yyi2bhW/J0.
ECDSA key fingerprint is MD5:dc:05:b9:ef:7e:67:f0:a5:16:2c:28:1a:b8:3a:86:2c.
Are you sure you want to continue connecting (yes/no)?
When I enter yes, nothing happens. Until eventually...
packet_write_wait: Connection to <IP and port>: Broken pipe
This script works fine on another server - just not this one.
Examining ~/.ssh/known_hosts, there are several entries for bitbucket.org - at least some of which seem to correspond to the required public key.
- Do I need to purge known_hosts of all but one bitbucket.org entry?
- Is there a way of getting more feedback as to what's going on at the remote server?