Pycharm GitHub 'Push failed: fatal: Authentication failed'

Every time I try to push a repository in GitHub with Pycharm the it fails.

Push failed: fatal: Authentication failed for 'https://github.com/(my github repository)/'

In Settings->Version Control->GitHub, I filled the fields Host, Loging and Password (Auth Type: Password). Testing it: “Connection successful”

  • How do I use vim as 'git log' editor?
  • git revision walk setup failed
  • Git ignore all files of a certain type except in all subdirectories of a certain directory?
  • Why people name a directory “vendor” which contains all programs that are made by others?
  • Export a local git
  • Is there a script that provides the equivalent to git-bisect for Perforce (p4)?
  • In Settings->Version Control->Git, Path to Git executable is seted with the full path, SSH executable: Buil-in

    Pycharm version 3.1.1
    Git version 1.8.4.msysgit.0
    On Win 7.

  • Multiple GitHub Accounts & SSH Config
  • Whats the simplest way to return all commits on git to master branch that have not been merged already?
  • Unable to auto-detect email address
  • Is there a risk to reuse branch names?
  • To hook into Git, would Ruby have an advantage over c#?
  • What's the best practice for a git branch that needs master to be constantly merged to it?
  • 3 Solutions collect form web for “Pycharm GitHub 'Push failed: fatal: Authentication failed'”

    It seems there is some issue (if using https) if username or password contains “some” special characters.

    So, I’ve generated a secondary password (“personal access token”) in GitHub’s application settings page (using the “Create new token” button), I did copy this token. Then I’ve selected Auth Type: Token in Settings->Version Control->GitHub, and pasted the token.

    Testing it: Connection successful for user . Now the git push works perfectly.

    If your username or password has special characters, you can replace it with the Percent-encoding for theses characters.
    for example, if your password is “test@2010”, you will write it as “test%402010” and the config command will be like this
    git config remote.origin.url https://{username}:test%402010@github.com/{repo_username}/{repo_name}.git

    So I found the solution to my problem, and I hope this helps:

    If you are using KDE, or Gnome, your “KDE Wallet”, or “Gnome Keyring” manager will save your password when you push for the first time. However, if you enter the password wrong, these managers (ksshaskpass for KDE) will store the wrong password and will send the wrong password every time.

    To fix this, open the appropriate manager and change the password. With KDE, it is in: Kick-off-menu > System Settings > Account Details > KDE Wallet, then click “Launch Wallet Manager”, and find “ksshaskpass”, expand it, and then expand “Passwords”, then find your github registered email address there, click it, and on the right, click on “Show Contents”. Now change that value (in case wrong password), then hit save. and you’re done!

    Now that means you don’t have to type in your password each time for https push, and you don’t have to use SSH keys either 😉

    Git Baby is a git and github fan, let's start git clone.