0
在尝试使用Capistrano的部署一个网站,我得到以下信息:Capistrano的失败与GIT认证
INFO ---------------------------------------------------------------------------
INFO START 2016-10-19 21:56:37 +0200 cap staging deploy
INFO ---------------------------------------------------------------------------
INFO [95790a6d] Running /usr/bin/env mkdir -p /tmp as [email protected]
DEBUG [95790a6d] Command: /usr/bin/env mkdir -p /tmp
INFO [95790a6d] Finished in 0.407 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/git-ssh-mysite-staging-username.sh 0.0%
INFO Uploading /tmp/git-ssh-mysite-staging-username.sh 100.0%
INFO [0cd82d0b] Running /usr/bin/env chmod 700 /tmp/git-ssh-mysite-staging-username.sh as [email protected]
DEBUG [0cd82d0b] Command: /usr/bin/env chmod 700 /tmp/git-ssh-mysite-staging-username.sh
INFO [0cd82d0b] Finished in 0.029 seconds with exit status 0 (successful).
INFO [0265a2c7] Running /usr/bin/env git ls-remote --heads [email protected]:username/mysite.git as [email protected]
DEBUG [0265a2c7] Command: (export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-mysite-staging-username.sh" ; /usr/bin/env git ls-remote --heads [email protected]:username/mysite.git)
DEBUG [0265a2c7] conq: repository access denied.
DEBUG [0265a2c7] fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
然而,当我手动运行此命令,为相同的用户,一切正常:
$ export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-mysite-staging-username.sh" ; /usr/bin/env git ls-remote --heads [email protected]:username/mysite.git
928c1e393778f25869f14958151c4ea1dc7d68b6 refs/heads/master
我已验证我的公钥是存储库的bitbucket部署密钥。这之前工作得很好。有什么办法可以进一步调试吗?