![]() I reckon that this solution will also work in situations other than Sourcetree on MacBook only. 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. When I swapped both records, ssh to github worked again, but ssh to 145.20.188.96 did not work anymore. IdentityFile /Users/sjo00577/.ssh/id_ou_rsa In my case it contained two records: # - ssh to OUNL. When I try to use the PuTTY generator, it asks for a file to import, not a string or text. I have no clue how to insert this key into SourceTree. where XYZ is a long string (I assume the key itself). As of that date, DSA keys ( ssh-dss) are no longer supported. I have an SSH public key in the format: ssh-rsa XYZ rsa-key. Note: GitHub improved security by dropping older, insecure key types on March 15, 2022. After you generate the key, you can add the public key to your account on to enable authentication for Git operations over SSH. I found out that the ssh configuration file, which is ~/.ssh/config, plays a role in this matter. You can generate a new SSH key on your local machine. You can do this, although it tends to be more complex to setup than it would be to just allow sourcetree to generate its own. Instead of trying and erring with lots of different answers, I went after the root cause of the problem. I understand that you have an existing SSH key you want to use with sourcetree rather than be forced to generate a new one. I had the same problem, except the error message I got sounded: Permission denied (publickey,password) 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 |