我试图部署到一个新的Ubuntu 14.04框与cap staging deploy ,但capistrano挂在git:check任务:
GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/<app_name>/git-ssh.sh /usr/bin/env git ls-remote --heads [email protected]:<github_user>/<app_name>
为什么发生这种情况?
原来,这是因为在/etc/services中更改了ssh的端口号
debugging步骤以防其他人遇到类似的问题:
首先我跑了:
GIT_CURL_VERBOSE=1 GIT_TRACE=1 git ls-remote [email protected]:<github_user>/<app_name>
在debugging中,下面的行被挂起:
trace: run_command: 'ssh' '[email protected]' 'git-upload-pack '\''<github_user>/<app_name>'\'''
然后我试着:
ssh -vvv [email protected]
并在debugging中,我看到ssh试图连接到一个非标准的端口。