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”

  • git push after git filter-branch rejected
  • Git revert merge to specific parent
  • Replacing dependency with custom forks using pip
  • How do you deploy from svn when your original repository is in Git
  • Jenkins hangs when fetching code from Git
  • Routinely sync a branch to master using git rebase
  • 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.

  • Git / SourceTree - remote invalid username or password
  • How does --no-ff merge break bisect and blame?
  • GIT_DISCOVERY_ACROSS_FILESYSTEM not set
  • Git or SVN for Rails app?
  • Following git-flow how should you handle a hotfix of an earlier release?
  • Git reset = fatal: unable to read tree
  • 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.