![]() Ensure you have this token saved somewhere TEMPORARILY because we will need it. 5- Enter Host URL as follows: 6- Prepare your new Personal Access Token, then click 'Refresh Personal Access Token' button. There are many other products available in market with GitHub GUI feature, but I think SourceTree is one of the best. 4- Open SourceTree, go again to Tools -> Options -> Authentication. Double click a repository in SourceTree, click Setting icon in the top right of the popup window. Type your password (this will be the generated token in above steps) Since the OP is using SourceTree, do the following: Generate your Personal access tokens in Github account setting.Make sure you copy the generated token, otherwise you will not be able to get the same token again.Provide some token description and select appropriate scopes. ![]() Now click on " Generate new token" button.You can now clone GitHub repositories with above credentials.On the pop-up window, select Host as "GitHub".Type Keychain access then press the Enter key to launch the app. ' Updating your credentials via Keychain Access Click on the Spotlight icon (magnifying glass) on the right side of the menu bar. Here are the steps on MAC OS (steps on Windows OS are similar): For more information, see ' Creating a personal access token. ![]() 2 Factor Authentication) for your GitHub account.Ĭonfiguring GitHub with SourceTree is very very simple. For added security, you can enable 2FA (i.e. SourceTree is a free Git client and provides beautiful GUI that offers a visual representation for various Git repositories. SourceTree is one such Atlassian product. I personally think that using any kind of user interface for committing code and performing various GIT operations is much more simpler and productive. Similarly, many prefer to commit code in GitHub repositories using various commands. So now Sourcetree will give me a single password prompt, and entering the ssh private key password will work.Many developers and organizations use GitHub as code repository. If you don't have a personal access token or an SSH key, you can create a personal access token for the command line or generate a new SSH key. Head over to your personal account settings to generate a new token. So my final solution was 1) keep the passwords on the ssh keys 2) make all these passwords the same. To use the API or Git on the command line to access protected content in an organization that uses SAML SSO, you will need to use an authorized personal access token over HTTPS or an authorized SSH key. Setting up a PAT will require you to make a new one from Github’s settings, and swap your local repositories over to using them. In fact, I am guessing Sourcetree is doing exactly the same in the background. In fact, if you add passwords to the dialog in the same order as you would in the shell to an ssh-add, this would work. Think of it this way - if you have a fresh shell in your system, and you just started ssh-agent up, and ran ssh-add, what are the password prompts that you get? For every such password prompt, Sourcetree will give you this dialog box. If you have multiple ssh private keys which have different passwords, Sourcetree will give you a password prompt for each password. However since I wanted the password to be there, I kept investigating why it wasn't accepting my ssh key password. If I remove the password from the ssh key, this prompt doesn't come up. In my case, the password that Sourcetree was asking for was for the ssh private key password. Re-install SourceTree using all the correct credentials, point to the right repository and such.Īfter all this, SourceTree asked for my GitHub credentials twice, with two different dialog boxes, then stopped and worked! No more endless loop. Make sure your GitHub is setup the way you desire (for me, I also created and saved an SSH key that I used for SourceTree setup). Using Sourcetree to connect to Github without password by Thomas Wu Geek Culture Medium Write Sign up Sign In 500 Apologies, but something went wrong on our end. Go up one level to ".\Local" and delete the "Atlassian" folder as well. I eventually ended up at "C:\Users\myusername\AppData\Local\SourceTree". Mine forked at "C:\Users\myusername\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Atlassian" where the shortcut pointed to another shortcut. The non-obvious bit was needing to delete the actual program files manually.įrom any "SourceTree.exe" shortcut, open file location. I setup SourceTree first and just clicked all the "setup later" options.Īn easy fix - Uninstall and re-install SourceTree. The problem for me seemed to be the order of setup between SourceTree and GitHub.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |