GitHub Enterprise Token giving Incorrect Credentials

Answered

I have git and the enterprise version of GitHub up and running from the terminal. However, for some reason I cannot get it working from PyCharm.. I must have done something wrong.

From my enterprise website, I can create a private access token for an api, giving it write/read access. I saved this token there, and copied it into the "token" field in pycharm, along with the enterprise server. But the message I get is "incorrect credentials".

[I am unable to use my username and password to sign in and create a token, I guess this makes sense to me that I need to create it from the enterprise side.. ]

 

any help appreciated.

4 comments

I am having the same problem - I can authenticate with git but not with our GitHub enterprise. I suspect this is due to our enterprise being on an insecure connection (http, not https).

0

> write/read access

What scopes does the token have assigned?

> I can authenticate with git

Do you mean git on the commadn lien can connect fine, but not the IDE?

> I suspect this is due to our enterprise being on an insecure connection

If your server accepts http, it should not be the problem. If the error is the same - could be some permissions issue.

> I am unable to use my username and password to sign in and create a token

Yes, if you can't use your login and password to ket IDE create a token, you should generate it manually. BTW, why can't you use your credentials?

0

Hi Dmitriy,

> Do you mean git on the command line can connect fine, but not the IDE?

I can work with my company's GitHub enterprise (close, push, pull, etc) perfectly from within PyCharm same as command line. The problem is specifically when attempting to create a "GitHub" connection within PyCharm either at "Settings -> Version Control -> GitHub" or "Tools -> Tasks & Contexts -> Configure Servers".

> Yes, if you can't use your login and password to ket IDE create a token, you should generate it manually. BTW, why can't you use your credentials?

I can't speak for Elena, but I am "unable to use my username and password" in the sense that when I try to create the GitHub connection using them I get a message that the connection is refused. I also tried creating a personal access token manually with full admin permissions to everything (all scopes enabled), and when I try to use it in PyCharm to configure a GitHub connection I get the message "Invalid authentication data. Connection refused.". This is the same message whether I use my username/password or my manually generated personal access token.

0
The Invalid authentication data. Connection refused error is likely caused by forcing HTTPs for GitHub connections. If https is not enabled on GitHub Enterprise, the connection would fail.
The issue has been fixed - see https://youtrack.jetbrains.com/issue/IDEA-209405
0

Please sign in to leave a comment.