GitHub integration in PyCharm : Authentication failed for push

Answered

Hello,

I've successfully checkout from Git one of my repo and I can commit changes locally, but when I try to push I get an authentication error.

In the console, I read :

remote: Anonymous access to fredele/FPlayer.git denied.

Under settings> Version control> Github I have set my account.

I've read the help here but I cannot find an answer.

 

I'm using the community edition on Ubuntu.

Does anybody else have the same problem ? Thanks !

0
6 comments

Since upgrading to the latest version of Pycharm 2018.2, I cannot push within my environment anymore. I am repeatedly asked for my username and password which always fail. I can push at the prompt though. 

Settings  > Version Control > Github logs in fine.

I changed my password so not to contain odd characters (as per https://stackoverflow.com/questions/22348093/pycharm-github-push-failed-fatal-authentication-failed) but no success.

I enabled 2-factor authentication just now (the above issue occurs before and after this change), which complicates things... . Generating access codes and using those as passwords still fails.

UPDATE:

I followed this advice about preventing passwords saving in a local DB. https://stackoverflow.com/a/50483478/960471 Push worked! Re-enabling the saving of passwords in local DB and will report back if this breaks things.

1

Does push work if executed in the command line? Does it prompt you for any input?

> remote: Anonymous access to <user>/<repo>.git denied. 

Probably, this is only a part of the error. There also should be the second part, e.g. Fatal: Authentication failed for...

The issue is most likely that git uses wrong credential to authenticate. It could happen if git has a credential helper enabled which saved wrong creds (in this case push from the command line would fail), or it is IDE providing wrong saved passwords.

It the latter case, check if there are entries from IntelliJ Platform Git in your system keychain and remove them. Make sure IDE is closed when removing the entries.

0

Yes, it totally makes sense. The second part of the error is present.

I've finally solved my problem by changing the URL in VCS>Git>Remotes with the username and the password directly in the URL ...

 

Thanks for your time and your answer !

0

> with the username and the password directly in the URL ...

While this could work, it is completely insecure and I would not recommend this. A better approach, if it cannot be properly solved for some reason, is to configure git credential helper to save authetnication

0

GitHub authentication fails all of a sudden. Latest version of PyCharm, 20.3.5 Professional.

I think it's finally time to switch to Visual Studio.

This is just one too many...

0

I was getting:

"remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead."

Which I did, but didn't work.

And after literally hours of trying and failing at all the solutions above, I was finally able to get it work by:

Turning off "use credential helper" under Preferences->Version Control->Git

(note that this is a GitHub issue, but the configuration change is under Git)

0

Please sign in to leave a comment.