简体   繁体   中英

SmartGit authentication to bare repository fails, while push from commandline works

I've added a remote bare repository using commandline:

git add remote production ssh://username@domain.com/path/to/repo.git

I'm able to push to the repository using:

git push production master

Now I'd like to push from SmartGit:

  1. I right click my local master-branch and choose Push To ... .
  2. In the window I select the production repository and click Push .
  3. A dialog is shown asking me for private SSH key and passphrase. I point to the private key and type the passphrase then click Login .
  4. The dialog is shown again and I click Login once again.
  5. SmartGit display an error in the Output-window:

     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. 

I've checked that I have the correct access rights and that the repository exists. Also private key has only read/write permissions for the onwer ( chmod 600 ~/.ssh/id_rsa ).

What am I missing?

  1. Enable Use system SSH client in the Preferences , section Authentication
  2. Install ssh-askpass: sudo apt-get install ssh-askpass
  3. Then push again ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM