7

私は gitHub と Egit を連携させようとしましたが、成功しませんでした。github のソフトウェア バンドルをインストールし、その方法で SSH キーを作成しましたが、Egit はパスフレーズのプロンプトを表示せず、次のエラーが表示されます。

Cannot get remote repository refs.
Reason: ssh://git@github.com:22: passphrase for C:\Documents and Settings\User\.ssh\id_rsa

プッシュ メニューに次の設定があります。

URI: ssh://git@github.com/YoungMaker/<projectName>.git
host: github.com
Repository path: /YoungMaker/<projectName>.git
protocol: SSH
port <BLANK>
User: git
password <blank>

また、GIT_SSH 環境変数を試して、C:\Documents and Settings\User.ssh と plink.exe に設定しました (それが何かはわかりません (明らかにいくつかの .exe))。

gitHub GUI からプッシュしようとした後、このエラーが発生しました。C:\Documents and Settings\User.ssh ディレクトリに構成ファイルと id_rsa キーがあるため、非常に奇妙です。

Pushing to git@github.com:YoungMaker/GitTester.git
error: cannot spawn C:\Documents and Settings\User\.ssh: No such file or directory
fatal: unable to fork
4

2 に答える 2

6

Old question, but for future reference:

Make sure you did setup a push remote. It worked for me when I got both the Cannot get remote repository refs-problems ("... Passphrase for..." and "Auth fail" in the "Push..." dialog).

Provided that you already:

  1. Setup your SSH keys with Github (Window > Preferences > General > Network Connections > SSH2)

  2. Setup your local repository (you can follow this guide for that)

  3. Created a Github repository (same guide)

... here's how you do it:

  • Go to the Git Repositories view (Window > Show View > Other > Git Repositories)
  • Expand your Repository and right click Remotes --> "Create Remote"
  • "Remote Name": origin, "Configure push": checked --> click "OK"
  • Click the "Change..." button
  • Paste your git URI and select protocol ssh --> click "Finish"
  • Now, click "Save and Push" and NOW you should get a password prompt --> enter the public key passphrase here (provided that you DID (and you should) setup a passphrase to your public key) --> click "OK"
  • Now you should get a confirmation window saying "Pushed to YourRepository - origin" --> click "OK"
  • Push to upstream, but this time use "Configured remote repository" as your Destination Git repository
  • Go get yourself a well earned cup of coffee!
于 2013-09-01T20:55:39.530 に答える
2

「 GitHub:SSHキーパスフレーズ」で説明されているように、パスフレーズで保護された秘密キーを作成した場合は、パスフレーズが必要です。
ただし、そのパスフレーズを提供するにはSSHエージェントが必要です。

Egitがプッシュ時にプロンプ​​トを表示しない場合は、次のことを意味している可能性があります。

  • SSHキーがパスフレーズで保護されていません
  • SSHキーにアクセスできない(パスが間違っている、またはそのパスの保護が間違っている)

Vogellaのチュートリアルも参照してください。

Egit ssh uri

于 2012-04-22T01:01:36.050 に答える