In this article, we are showing how to properly configure access of your 3rd party Git GUI client like SourceTree, GitHub Desktop, MeGit/EGit to remote repositories like GitHub and Bitbucket.
When using 3rd party Git GUI, you might have a problem setting authentication. Typically, that will manifest itself in this way: Git push to GitHub from 3rd party client results in "Authentication Failed". The situation can happen with Git clients SourceTree, GitHub Desktop, MeGit/EGit with remote repositories GitHub and Bitbucket (it does not necessarily happen in all combinations, but I have seen it in several).
1.1. Problem on MeGit
I will demo the problem with screens from MeGit, but it will happen with other Git GUI clients.
So, after you try to push, you get a message:
Then you are prompted for the credentials:
Then you enter your GitHub account name and password. But it does NOT work. You are again presented with the same message: “Not authorized”.
1.2. Problem in SourceTree
Here is how the same situation looks in SourceTree application:
Then you enter your account name and password. But it does NOT work. You are again presented with the same message: “Not authorized”.
That is not the proper password you are entering here. It is not the GitHub account password they want here. You need to generate an “access token.”
2.1. Generating Access token on GitHub
Here are a couple of screens that will help you create a token at GitHub:
Once you get the Access token, enter it in as a password together with your GitHub account name to your 3rd party Git GUI.
2.1. Generating Access token on Bitbucket
The analogous process is on Bitbucket site. Here are a couple of screens to help you.
Again, once you get the Access token, enter it in as a password together with your Bitbucket account name to your 3rd party Git GUI.
- 12th August, 2022: Initial version
Mark Pelf is the pen name of just another Software Engineer from Belgrade, Serbia.
My Blog https://markpelf.com/