Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,466,911
Community Members
 
Community Events
176
Community Groups

How to Remove Keys from SourceTree SSH Agent

Edited

I am using SourceTree on Windows.  I have SSH keys to validate the server connection.  So, when I start Sourcetree it launches the SSH Agent which then asks me for the passwords for each key. That is fine.

However, while I can see an option in SourceTree to "Add SSH Key" I cannot see how to remove one.  My actual problem is that, due to a misleading error message, I re-added the key and it now has the same key multiple times and asks for too many passwords at start-up!  But, more generally, i would like to be able to list and remove keys from the SSH agent.

I have tried using command line ssh-add but it says

Error connecting to agent: No such file or directory

(Tried this both with windows CMD shell and in the Git bash terminal that SourceTree launches)

I see a running ssh-agent.exe process in Task Manager when SourceTree is running - in the Details tab. But in the Services tab it says the service is stopped. So, I guess SourceTree has started it but how do I connect to it? Alternatively, how to tell SourceTree not to start it's own but use the Windows Service?

I am using the OpenSSH SSH client (in SourceTree options)

If anyone here can help then great.  But given no response (and given that SourceTree is managing the SSH Agent and adding the keys so should support removing them) I also logged a bug: https://jira.atlassian.com/browse/SRCTREEWIN-13736

1 answer

0 votes

Not sure if you're still looking for an answer to this or not ...

Windows 7 64-bit, SourceTree V 3.4.11

I modified the "LastSSHKeyPath" setting value in the following file:

C:\Users\YOURUSERID\AppData\Local\Atlassian\SourceTree.exe_Url_vfgapqzknjyobvhwji4wqlbfzwn5d4xz\3.4.11.0\user.config

Just remove the SSH key paths from that value that you no longer use / need.

Example Old Value:

<setting name="LastSSHKeyPath" serializeAs="String">
<value>C:\Users\Todd\.ssh\id_rsa;C:\Users\Todd\.ssh\thlucasi7_id_ed25519;C:\Users\Todd\.ssh\thlucasi7_id_ed25519.pub;C:\Users\Todd\.ssh\thlucasi7_id_ed25519.ppk;C:\Users\Todd\.ssh\id_ed25519.pub;C:\Users\Todd\.ssh\id_ed25519;C:\Users\Todd\.ssh\id_rsa;C:\Users\Todd\.ssh\id_ed25519;C:\Users\Todd\.ssh\id_rsa;C:\Users\Todd\.ssh\thlucasi7_id_ed25519</value>
</setting>

Example New Value:

<setting name="LastSSHKeyPath" serializeAs="String">
<value>C:\Users\Todd\.ssh\thlucasi7_id_ed25519;</value>
</setting>

Hope it helps!

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events