Here are a couple of screens to help you.Īgain, once you get the access token, enter it as a password together with your Bitbucket account name to your third party Git Gui. The analogous process is on Bitbucket site. Once you get the access token, enter it as a password together with your GitHub account name to your third party Git Gui. Here are a couple of screens that will help you to create a token at GitHub: You need to generate an “access token." 2.1 Generating Access token on GitHub You are not entering the proper password here, because it is not the GitHub account password they want here. You are again presented with the same message: “Not authorized” 2 Solution Then you enter your account name and password. Here is the way the same situation looks in the SourceTree application: You will again be presented with the same message: “Not authorized.” 1.2 Problem in SourceTree Then you are prompted for the credentials.Įnter your GitHub account name and password. So, after you try to push, you get a message: I will demo the problem with screens from MeGit, but it will happen with other Git Gui clients. It does not necessarily happen in all combinations, but I have seen it in several of them. I go to and enter the key that I copied into the clipboard under the SSH and GPG keys section of the sidebar. Typically, that will manifest itself in this way: Git push to GitHub from the third party client results in "Authentication Failed." This situation can happen with Git clients SourceTree, GitHub Desktop, MeGit/EGit with remote repositories GitHub and Bitbucket. Host HostName IdentityFile /.ssh/idrsa User git 7. When using third party Git Gui, you might encounter a problem with setting authentication. I reckon that this solution will also work in situations other than Sourcetree on MacBook only.In this article, we will show how to properly configure access of your third party Git Gui client like SourceTree, GitHub Desktop, MeGit/EGit to remote repositories like GitHub and Bitbucket. So I guess that you want to look for the problem in ~/.ssh/config. Even better is to confine github to the correct host too. This works fine and it solved the problem. The following solution solved the problem: Just let the first record refer only to the designated host instead of all hosts: # - ssh naar OUNL. Apparently, the first occurrence of host * is used for every host, so the github host is shadowed entirely. This prompted me to read a manual for the ssh config file. I picked basic, and entered my GitHub login and password, but then there is no way for me to change the default SSH Key, which is set to idrsa. On my third screen, I got the Connect a hosted account, I clicked on. I am trying to setup SourceTree for the first time on my MacbookPro (Monterey). When I swapped both records, ssh to github worked again, but ssh to 145.20.188.96 did not work anymore. Setting up SourceTree for the first time on my mac. IdentityFile /Users/sjo00577/.ssh/id_ou_rsa In my case it contained two records: # - ssh to OUNL. I found out that the ssh configuration file, which is ~/.ssh/config, plays a role in this matter. Step by step on how to install and configure Sourcetree with your github account, clone a repository to your computer, update changes, commit and then push t. Instead of trying and erring with lots of different answers, I went after the root cause of the problem. I had the same problem, except the error message I got sounded: Permission denied (publickey,password) Click the 'Gear' icon in the top right corner and select 'Settings' Click 'Add Account' Hub: Select 'GitHub' Username: (Enter your GitHub username) Password: (Enter your GitHub password) Protocol: Select 'SSH' Click 'OK' Click 'Close' Click the 'Remote' tab to see your. Just follow the steps in the answer with "Update Jan 2017" BUT, there's a nice way to fix this from the Apple stack exchange: EDIT: Apparently OSX Sierra made it so you don't get your keys back when you login, so you'll have to do this every time you start your computer. After this you should be ready for a password-less login.Īfter I added my SSH key, SourceTree started authenticating correctly. You will then be prompted for your passcode, which will be stored in your keychain. To add your private key to the keychain simply use the command: ssh-add -K /path/of/private/keyĪs an example if your private key is stored at ~/.ssh and is named id_rsa, you would use the command: ssh-add -K ~/.ssh/id_rsa On Mac OSX, the native SSH client can use the built-in keychain directly. It was hard to find this answer, but it looks like the way to do this is to just add the ssh key to your keychain in Mac OS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |