Bug 356 - Git public key authentication does not accept valid private key passphrase
Summary: Git public key authentication does not accept valid private key passphrase
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control (show other bugs)
Version: 2.8.6
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Alan McGovern
URL:
Depends on:
Blocks: 3241
  Show dependency tree
 
Reported: 2011-08-21 19:34 UTC by Wayne Carson
Modified: 2012-03-29 06:43 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Wayne Carson 2011-08-21 19:34:48 UTC
When using Git version control with public key authentication (as is required by Github), the valid private key passphrase is not accepted.  

Steps to reproduce:
1) Working with git project which has github as the remote (origin) repo.
2) Try to "Push Changes..." to remote repo (Github)
3) While connecting to the remote repo, the "Git Credentials" popup windows is displayed, and is correctly prompting for the passphrase for the relevant private key: "Passphrase for /Users/Me/.ssh/id_rsa".
4) Upon entering the correct passphrase, and clicking "OK", the "Git Credentials" popup is redisplayed and is again prompting for the passphrase.

It will not allow me past the passphrase prompt, even when using the same passphrase that works from the command-line and other Git related programs such as "Tower".

Note: This *may* be a duplicate to Bug ID #330 which describes MonoDevelop requiring password for Git push/fetch; however that seems to be specific to password authentication, while this bug is related to public key authentication.

Bug #330: http://bugzilla.xamarin.com/show_bug.cgi?id=330
Comment 1 Alan McGovern 2012-02-14 07:29:04 UTC
Does this bug still exist? If so, would you be able to generate a new ssh key which you can share with me which will trigger the bug? My own SSH key works just fine with current builds of monodevelop, so either the bug is fixed or there is some peculiarity with your key/password.
Comment 4 Wayne Carson 2012-02-23 20:04:29 UTC
Some additional information on this which might be useful to you...

I experienced the exact same problem (passphrase was not accepted) on Eclipse using the EGit plugin. Based on the Egit bug report below, I fixed the issue on Eclipse by using a newer version of the SSH library used by EGit (JSch in this case).

https://bugs.eclipse.org/bugs/show_bug.cgi?id=326526

Since I'm experiencing the same symptoms on MonoDevelop with the same key, maybe the issue is with the SSH library that MonoDevelop uses not being able to handle the encryption being used in my key?
Comment 5 Alan McGovern 2012-02-28 05:07:15 UTC
Thanks for the test key, working on this now
Comment 7 Alan McGovern 2012-03-05 18:55:10 UTC
I finally figured out the issue, we had a hardcoded value in the RSA code which meant we were incorrectly signing data. I've fixed the issue and am now getting the patch reviewed and will try to get it backported so it is included in Mono 2.8.8 final.
Comment 8 Orlin Todorov 2012-03-27 06:12:56 UTC
When is 2.8.8 final expected?  I have the same problem.  Any workarounds?
Comment 9 Alan McGovern 2012-03-27 06:24:04 UTC
Assuming you are hitting this issue, you can simply upgrade to the latest MonoDevelop beta. These have contained the fix for several releases. The latest release can be found at: http://monodevelop.com/Download . Unfortunately there are no workarounds other than this.
Comment 10 Orlin Todorov 2012-03-29 06:43:57 UTC
Thank you - the latest Beta worked.