2016-05-15 12 views
1

我添加了一個遠程純倉庫使用命令行:SmartGit身份驗證的裸庫失敗,而從命令行推工程

git add remote production ssh://[email protected]/path/to/repo.git 

我用我能推到倉庫:

git push production master 

現在我想從SmartGit推:

  1. 我右鍵點擊我的本地主分支,選擇膿h ...
  2. 在窗口中,我選擇生產庫並點擊
  3. 將顯示一個對話框,詢問我是否使用私人SSH密鑰和密碼。我指向私鑰並鍵入密碼,然後單擊登錄
  4. 對話框再次顯示,我再次點擊登錄
  5. SmartGit在輸出窗口中顯示的錯誤:

    Push: Could not read from remote repository. 
    /var/www/website> git push --porcelain --progress --recurse-submodules-check production refs/heads/master 
    Could not read from remote repository. 
    Please make sure you have the correct access rights 
    and the repository exists. 
    Could not read from remote repository. 
    

我檢查,我有正確的訪問權限,以及那個倉庫存在。此外,私鑰只對onwer具有讀/寫權限(chmod 600 ~/.ssh/id_rsa)。

我錯過了什麼?

+1

配置時,會發生什麼在**首選項**,第**部分**身份驗證**中使用系統SSH客戶端**。 – mstrap

+0

@mstrap工作!首先,日誌拋出一個錯誤:'ssh-askpass [...]沒有這樣的文件或目錄。所以我做了'sudo apt-get install ssh-askpass'。然後嘗試像上面描述的新推。謝謝! – NinjaFart

+0

我建議根據mstrap建議編寫答案,並且標記已被接受。 – Arashsoft

回答

0
  1. 啓用使用系統SSH客戶端,部分認證
  2. 安裝SSH-askpass:sudo apt-get install ssh-askpass
  3. 然後再推...