2017-05-31 184 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並添加了公鑰。仍然得到相同的錯誤。 謝謝你的回答。 –

相關問題