Menu
- Atlassian Generate Ssh Key
- Add Ssh Key To Sourcetree
- Atlassian Generate New Ssh Key Pair
- Bitbucket Add Ssh Key Windows
- Linux Create Ssh Key
- Status:Closed(View Workflow)
- Resolution: Fixed
- Labels:
- Bug Fix Policy:
I just tried cloning a bitbucket repo and received these within a few minutes of each other:
Mar 11, 2020 Generate a new SSH key using PuTTY Run through a bunch of unnecessary hoops (to save the public and private keys to disk. To generate an SSH Key, select Tools Create or Import SSH Keys. This window should pop up: 2. Click Generate, and move the mouse randomly until a key is generated: 3. A public key and a private key should appear. Save them both by clicking Save public key (save as.pub filetype), and Save private key (save as.ppk filetype): 4.
My known_hosts file shows the same key fingerprints as https://confluence.atlassian.com/bitbucket/use-the-ssh-protocol-with-bitbucket-cloud-221449711.html#UsetheSSHprotocolwithBitbucketCloud-KnownhostorBitbucket%27spublickeyfingerprints
Are you changing keys or is something amiss?
- Votes:
- 0Vote for this issue
- Watchers:
- 2Start watching this issue
Atlassian Generate Ssh Key
- Status:Needs Triage(View Workflow)
- Resolution: Unresolved
- Fix Version/s: None
- Labels:
- Environment:
User should be able to select an existing ssh key on their system Generate Key button is visible and clickable, when clicked, process continues, but no key is generated and a 'Tooltip' is displayed when account is saved indicating no SSH key. Jan 30, 2020 1) It works with the ECDSA format (one should generate a key with this format using Putty) 2) when importing your public key on bitbucket.org, DO NOT paste the content of the public key file (what you see by opening it with your favorite text editor), as the example A below. Instead, use Putty to load you key and copy-paste the format B below. Assumption3: you will need to add new SSH key pair in github settings; assumption4: after having the problem, pageant is running in your windows tray, in other words you can see it in the bottom right icons dialog; Steps to solve: sourcetree - tools - create or import SSH keys; Putty dialog shows up; choose key-SHH1 (RSA).
First issue...
I set up a remote account to GitHub using OAuth and SSH. I created a new SSH key and enabled the checkbox to allow SourceTree to modify my SSH configuration.
When I attempted to Clone a repo, the clone window opened but there was an Error message of 'This is not a valid source path / URL'. Clicking on the message shows the connection log with the following.
/Users/USERNAME/.ssh/config: line 97: Bad configuration option: usekeychain
/Users/USERNAME/.ssh/config: terminating, 1 bad configuration options
fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists.
/Users/USERNAME/.ssh/config: terminating, 1 bad configuration options
fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists.
Add Ssh Key To Sourcetree
I opened /Users/USERNAME/.ssh/config file and found the following new entry
# — SourceTree Generated ---
Host InsomniacSoftware-GitHub
HostName github.com
User InsomniacSoftware
PreferredAuthentications publickey
IdentityFile /Users/USERNAME/.ssh/InsomniacSoftware-GitHub
UseKeychain yes
AddKeysToAgent yes
# ----------------------------
# — SourceTree Generated ---
Host InsomniacSoftware-GitHub
HostName github.com
User InsomniacSoftware
PreferredAuthentications publickey
IdentityFile /Users/USERNAME/.ssh/InsomniacSoftware-GitHub
UseKeychain yes
AddKeysToAgent yes
# ----------------------------
Commented out the UseKeychain line and saved. Back in SourceTree, clicked on the Clone link and it successfully logged into GitHub.
Atlassian Generate New Ssh Key Pair
After some testing, I discovered the error is due to using a non-Apple version of ssh that doesn't support the UseKeychain option. I have installed OpenSSH_7.5p1 (OpenSSL 1.0.2l 25 May 2017) via Homebrew at /usr/local/bin/ssh. This is the version SourceTree is using since it is the first in $PATH.
To make it work with either version of ssh, at the top of the ~/.ssh/config file, add the following lines
Host *
IgnoreUnknown UseKeychain
This will cause non-Apple versions of ssh to ignore the UseKeychain option.
Second issue...
My system-wide ssh config file enables StrictHostKeyChecking by default (enforced by IT/Security department). SourceTree is unable to connect (Permission denied (publickey)) unless I create a 'Host github.com' entry in my personal ssh config file that disables StrictHostKeyChecking or points to a Known Hosts file that already contains github.com's public key.
Note: Adding these options to the SourceTree-Generated lines does not work as ssh isn't actually using those options (Host doesn't match, User should always be git, etc). SRCTREE-4631 discusses this a bit.
So that a user doesn't have to create a 'Host github.com' entry, SourceTree should always call git with the GIT_SSH_COMMAND variable setting these options, like this.
GIT_SSH_COMMAND='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentityFile=/Users/USERNAME/.ssh/STGENERATEDKEY' git clone [email protected] ...
Now for the request.
When I was setting up the GitHub account, the SSH Key line was showing the default id_rsa.pub key. Clicking on the Copy To Clipboard button would bring up the Generate SSH Key dialog. The icon said to hold down Option key to generate a new key but the Generate SSH Key dialog would appear whether I was holding down Option or not, so it couldn't use my id_rsa key either. I generated a new SSH key which SourceTree saved as InsomniacSoftware-GitHub[.pub].
Bitbucket Add Ssh Key Windows
However, I already have a SSH key uploaded to GitHub that I'm using for other git applications, which is different from the default id_rsa.pub key. Unfortunately there is no way in the dialog window to tell SourceTree to select a different key.
Request: Allow the user to pick an existing key instead of forcing them to generate a new key.
Linux Create Ssh Key
- Votes:
- 0Vote for this issue
- Watchers:
- 2Start watching this issue