Problems with GitHub plugin using an account with public key

I can't get the GitHub plugin to verify my credentials if I use a GitHub account that has a public key. If I use an account without a public key everything works fine.

I'm not sure why the GitHub plugin uses password authentication instead of public key, at lest does the configuration suggest that.

Has anyone got this working?

My setup is 64-bit osx, java and IntelliJ. I've done the following in my attempts to get it working:

Configured the Git plugin

  1. Set the path to the git executable.
  2. Selected native ssh.


Checking out from Git works fine.

Set up my ssh

.ssh/config is

Host github.com
     User git
     Hostname github.com
     PreferredAuthentications publickey
     IdentityFile ~/.ssh/git_rsa

I've verified that

ssh git@github.com

works fine but tests all private keys in .ssh

Set up OSX Key chain

Added all my private ssh keys  with ssh-add.




Regards

Martin Zachrison

.

14 comments
Comment actions Permalink

It works fine for me.
See the screencast on how I clone (other operations like pull or push also work for me): http://screencast.com/t/7QNEeCqJE4
Do I perform the same steps as you?

Which error do you get?

0
Comment actions Permalink

The message I get when trying to enter my credentials in the GitHub plugin is "Cannot loging using given credentials". Note that if I remove all my public keys from the github account, then Idea accept my crendentials. So cleary it is Idea that does not get access to my private ssh key.

I saw on your screen cast that you get prompted for you passphrase, I don't get that prompt. Could it be OSX Keychain that handles it?

Martin

0
Comment actions Permalink

Martin, could you please post there the content of your .git/config file.
(Of course you may remove all private information if there is any)

Also could you please see to the Version Control console (it's located here: http://www.screencast.com/t/e1gD3nnvh) and see if there are any error messages there at the time of authentication failure.

Attaching idea.log would also help.

Thanks

0
Comment actions Permalink

The .git/config file is only present when I've managed to clone from GitHub. But I'v can give you the content from on git repo:


[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "origin"]
url = git@github.com:cyberzac/trl8.git
fetch = +refs/heads/*:refs/remotes/origin/*
[gui]
wmstate = normal
geometry = 931x451+297+185 264 203
[branch "lift"]
remote = origin
merge = refs/heads/lift




There is no activity in the Version Control when I try to do GitHub login. Note that I don't get a prompt for my passphrase, I only get the "Login to GitHub" pop up window with a Login and Password input fields. If I run tcpdump I see https comunication, and if I remove all my private keys from the GitHub account it works.
0
Comment actions Permalink

And did you try to login to github? What happens in that case?

Note that GitHub plugin requires you being logged in to your account on github - thus the plugin allows you to see your repositories, etc.

You can also try to disable GitHub plugin and try to work only with Git plugin. Does the error persist in that case?

0
Comment actions Permalink

Top be clear.

  1. I can login on GitHub with the login/password on GitHubs web.
  2. I can run ssh git@github.com from the command line and it works
  3. If I remove all my private keys from the GitHub account the GitHub plugin works
  4. I can check out from ssh:git@github.com with the Git Integration plugin, it will use my private ssh key, regardless if the GitHub plugin is enabled or not.


I suspect that the GitHub plugin/Idea does not use my private ssh keys when accessing GitHub.

0
Comment actions Permalink

Hello Martin,

Thanks a lot for the detailed description, I've managed to reproduce this problem and it is already fixed. Fix will be available within next published IntelliJ IDEA version.

Regards,
Oleg

0
Comment actions Permalink

Martin,

As Oleg said, the problem is with GitHub plugin. So until the next release (which probably will be IDEA 10.0.2) the best solution for you is disabling GitHub plugin and working with pure Git plugin.
All Git integration functionality will remain.

0
Comment actions Permalink

Thanks, I'll be waiting by my internet connection.

0
Comment actions Permalink

Hi -

I believe I am seeing this same issue with IJ 10.0.3.   Any updates on when a fix will be available (or am I missing something)?

Thanks - ATM

0
Comment actions Permalink

Ignore this - sorry.  I was using my email address for my username, which works on github.com, but not in IJ.

0
Comment actions Permalink

I have got quite a similar ptoblem - if I can reuse the report above:

  1. I can login on GitHub with the login/password on GitHubs web.
  2. I can run ssh git@github.com from the command line and it works
  3. If I remove all my private keys from the GitHub account the GitHub plugin still DOES NOT work
  4. I can check out from ssh:git@github.com with the Git Integration plugin, it will use my private ssh key, regardless if the GitHub plugin is enabled or not.


My .ssh/config is:

Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_ddimitrov


I did a quick monitoring with procmon and I can see that IDEA exchanges a bunch of https requests with github.com, then launches git, which launches console, which launches git and in the end, git terminates suspiciously shortly after not being able to fing quserx.dll (no idea what that is).

Meanwhile, IDEA shows me a dialog asking me for my github URL credentials (I use 'github.com', <my git user-name> (not email), <password-that-works-on-web>). Then a progress bar flashes twice for about 2 seconds and the login diaog pops again with red text that it can not log me in with these credentials.

0
Comment actions Permalink

Please check that you use SSH, not HTTP url for your GitHub repository.
You can check this in .git/config or by running git remote -v
HTTP(S) authentication for Git repositories is not supported yet by IDEA.

0
Comment actions Permalink

This happens when I try to login to GitHub without having opened a project, using 'Check out from Version control'.
Altogether, part of an exercise that I'm trying to create a getting-started readme file for my project with step-by-step instructions.
I'd like to minimize the number of steps to get a full working environment.

0

Please sign in to leave a comment.