我曾尝试重新部署旧铁路项目。 Yersterday我遇到了权限被拒绝(公钥)问题,但是在我根据https://help.github.com/articles/generating-ssh-keys/重新配置了ssh的git之后它就解决了。
然而,今天我尝试重新部署它,同样的问题弹出,甚至在我重新配置git的ssh之后。
gdacs@hostname:/home/deploy/xxxx/current$ cap local deploy
DEBUG [6908bd83] Running /usr/bin/env [ -d ~/.rbenv/versions/2.1.2 ] as deploy@hostname
DEBUG [6908bd83] Command: [ -d ~/.rbenv/versions/2.1.2 ]
deploy@hostname's password:
DEBUG [6908bd83] Finished in 5.858 seconds with exit status 0 (successful).
INFO [b8d56ba2] Running /usr/bin/env mkdir -p /tmp/xxxx/ as deploy@hostname
DEBUG [b8d56ba2] Command: ( RBENV_ROOT=~/.rbenv RBENV_VERSION=2.1.2 /usr/bin/env mkdir -p /tmp/xxxx/ )
INFO [b8d56ba2] Finished in 0.111 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/xxxx/git-ssh.sh 0.0%
INFO Uploading /tmp/xxxx/git-ssh.sh 100.0%
INFO [92d9f56c] Running /usr/bin/env chmod +x /tmp/xxxx/git-ssh.sh as de ploy@hostname
DEBUG [92d9f56c] Command: ( RBENV_ROOT=~/.rbenv RBENV_VERSION=2.1.2 /usr/bin/env chmod +x /tmp/xxxx/git-ssh.sh )
INFO [92d9f56c] Finished in 0.136 seconds with exit status 0 (successful).
DEBUG [1410940c] Running /usr/bin/env git ls-remote git@github.com:xxxx.git as deploy@hostname
DEBUG [1410940c] Command: ( RBENV_ROOT=~/.rbenv RBENV_VERSION=2.1.2 GIT_ASKPASS= /bin/echo GIT_SSH=/tmp/xxxx/git-ssh.sh /usr/bin/env git ls-remote git@gi thub.com:xxxx.git )
DEBUG [1410940c] Error reading response length from authentication socket .
DEBUG [1410940c] Permission denied (publickey).
DEBUG [1410940c] fatal: Could not read from remote repository.
DEBUG [1410940c]
DEBUG [1410940c] Please make sure you have the correct access rights
DEBUG [1410940c] and the repository exists.
DEBUG [1410940c] Finished in 0.891 seconds with exit status 128 (failed).
cap aborted!
Exception while executing as deploy@hostname: exit
Tasks: TOP => git:check
(See full trace by running task with --trace)
The deploy has failed with an error: #<SSHKit::Runner::ExecuteError: Exception w hile executing as deploy@hostname: exit>
之后,我还检查了我的git帐户的publickey授权:
gdacs@hostname:/home/deploy/xxxx/current$ ssh -T git@github.com
Warning: Permanently added the RSA host key for IP address 'xxx.xxx.xxx.xxx' to the list of known hosts.
Hi xxxxxx! You've successfully authenticated, but GitHub does not provide shell access.
有人知道出了什么问题吗?
谢谢!