2017-05-31 183 views
1

我正试图在卡皮斯特拉诺的数字海洋上部署一个Rails应用程序,我有困难时期。我得到这个Rails,Capistrano,bitbucket,权限被拒绝(publickey)

00:00 git:check 
    01 git ls-remote [email protected]:paaggeli/mutetale.git HEAD 
    01 Permission denied (publickey). 
    01 fatal: Could not read from remote repository. 
    01 
    01 Please make sure you have the correct access rights 
    01 and the repository exists. 
(Backtrace restricted to imported tasks) 
cap aborted! 
SSHKit::Runner::ExecuteError: Exception while executing on host 
46.101.112.45: Exception while executing on host 46.101.112.45: git exit status: 128 
git stdout: Nothing written 
git stderr: Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

SSHKit::Runner::ExecuteError: Exception while executing on host 46.101.112.45: git exit status: 128 
git stdout: Nothing written 
git stderr: Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

SSHKit::Command::Failed: git exit status: 128 
git stdout: Nothing written 
git stderr: Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

Tasks: TOP => deploy:initial 
(See full trace by running task with --trace) 
The deploy has failed with an error: Exception while executing on host 46.101.112.45: Exception while executing on host 46.101.112.45: git exit status: 128 
git stdout: Nothing written 
git stderr: Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

capistrano.log文件

DEBUG Uploading /tmp/git-ssh-mutetale-production-ubuntu.sh 0.0% 

INFO Uploading /tmp/git-ssh-mutetale-production-ubuntu.sh 100.0% 

INFO [1baad1b1] Running /usr/bin/env chmod 700 /tmp/git-ssh-mutetale-production-ubuntu.sh on 46.101.112.45 

DEBUG [1baad1b1] Command: (export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.4.1" ; /usr/bin/env chmod 700 /tmp/git-ssh-mutetale-production-ubuntu.sh) 

INFO [1baad1b1] Finished in 0.156 seconds with exit status 0 (successful). 

INFO [2cd1c0fa] Running /usr/bin/env git ls-remote [email protected]:paaggeli/mutetale.git HEAD on 46.101.112.45 

DEBUG [2cd1c0fa] Command: (export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.4.1" GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-mutetale-production-ubuntu.sh" ; /usr/bin/env git ls-remote [email protected]tbucket.org:paaggeli/mutetale.git HEAD) 

DEBUG [2cd1c0fa]  Permission denied (publickey). 

DEBUG [2cd1c0fa]  fatal: Could not read from remote repository. 



Please make sure you have the correct access rights 

and the repository exists. 

运行在服务器返回ssh -T [email protected]

身份登录paaggeli。

您可以使用git或hg连接到Bitbucket。外壳访问被禁用。

请帮我

+0

今天得到了同样的错误。但是在'00:21 bundler:install'这一点它被中止了。几乎相同的错误日志。 –

+0

添加交换内存解决了我的问题。如果可能的话尝试升级你的服务器 –

+0

谢谢你的回复@AkashPinnaka,但我仍然有同样的错误 –

回答

0

检查您的git访问,并确保您的Capistrano的是使用克隆回购用户读取权限。

  1. 在服务器上运行ssh-keygen过程。
  2. 在任何GitHub页面的右上角,点击您的个人资料照片。
  3. 在您的个人资料页面上,单击存储库选项卡,然后单击存储库的名称。
  4. 设置选项卡在您的存储库的右侧边栏中,单击设置。
  5. 在边栏中,单击部署密钥。
  6. 单击添加部署密钥。粘贴您的公钥并提交。

https://developer.github.com/v3/guides/managing-deploy-keys/#setup-2

+0

我该怎么做? –

+0

更新了答案,并提供了有关如何添加部署密钥的说明。 –

+0

我使用bitbucket并添加了公钥。仍然得到相同的错误。 谢谢你的回答。 –

相关问题