• Status:Needs Triage(View Workflow)
  • Resolution: Unresolved
  • Fix Version/s: None
  • Labels:
  • Environment:

Generate Ssh Key Atlassian

First issue..

Project admins can add and manage SSH access keys for a project. The keys apply to every repository in the project. Repository admins can add and manage SSH access keys for a particular repository. The access key can allow either read-only or read-write Git operations.

  • Jan 30, 2020  If I use ssh-keygen -t rsa -b 4096 -C 'myemail@example.com' to generate a public and private key, it's recognized on bitbucket.org BUT it can be imported on Pageant so is not used by SourceTree. My need is quite simple, I had no problem on Mac OS X, but this is a new windows 10 and nothing works like it's supposed to.
  • On MacOS X Sierra when setting up SourceTree for first time and choosing 'SSH' as the authentication method, SourceTree: Should not have a URL for the Bitbucket server, should be a hostname without the Should not need a 'password' Generate SSH Key button is greyed out.

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.

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
# ----------------------------

Commented out the UseKeychain line and saved. Back in SourceTree, clicked on the Clone link and it successfully logged into GitHub.

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.

Only the ones users can open the PC who’s legal and feature already get entry to. Dows Windows 8.1 Product Key security device is high, which may save you unauthorized get entry to to the system.

To make it work with either version of ssh, at the top of the ~/.ssh/config file, add the following lines

Host *

IgnoreUnknown UseKeychain

Get Ssh Key

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.

Atlassian Generate New Ssh Key Online

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 git@github.com ..

Now for the request.

Atlassian Generate New Ssh Key Github

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].

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.

Atlassian Generate Ssh Key

Votes:
0Vote for this issue
Watchers:
2Start watching this issue