Adding SSH settings page to TortoiseSVN->Settings

33 views
Skip to first unread message

Michael Cole

unread,
May 7, 2020, 10:21:58 AM5/7/20
to TortoiseSVN-dev
Hi there, thanks for keeping this project going.  I used TortoiseSVN before git and now I've come full circle with a version control problem that is better suited to svn than git.

My users are often new developers and technical non-developers who don't understand the difference between TortoiseSVN and PuTTY, and that is ok.

To better support them, I'd like to make a simple settings page in TortoiseSVN where they can manage their keys:
- create new keys
- paste in existing keys
- copy their public key to paste into a website

Adding a page to the UI seems like copy/pasting code from another settings page (please let me know if I'm wrong).

My questions are:

- How does TortoiseSVN create it's part of the ssh tunnel.  TortoisePlink?  PuTTY?  openssl in the code?

- Where are the keys stored?  I think it goes through TortoisePlink.exe - can I set the key when making the tunnel so I don't have to mess with PuTTY's settings?

- Can TortoiseSVN (or it's programs) create keys or does it need an external program?  ( (I see \ext\openssl in the repo checkout)

If you could point me to some places in the code to start I'd really appreciate it.  Would you be interested in merging changes like this back into TortoiseSVN?

Thank you!

Michael

Stefan

unread,
May 7, 2020, 3:18:43 PM5/7/20
to TortoiseSVN-dev


On Thursday, May 7, 2020 at 4:21:58 PM UTC+2, Michael Cole wrote:
Hi there, thanks for keeping this project going.  I used TortoiseSVN before git and now I've come full circle with a version control problem that is better suited to svn than git.

My users are often new developers and technical non-developers who don't understand the difference between TortoiseSVN and PuTTY, and that is ok.

To better support them, I'd like to make a simple settings page in TortoiseSVN where they can manage their keys:
- create new keys
- paste in existing keys
- copy their public key to paste into a website

Adding a page to the UI seems like copy/pasting code from another settings page (please let me know if I'm wrong).

My questions are:

- How does TortoiseSVN create it's part of the ssh tunnel.  TortoisePlink?  PuTTY?  openssl in the code?

that's all done by the svn library, not TSVN. TSVN only configures the SSH client to be TortoisePlink by default, that's all.
 

- Where are the keys stored?  I think it goes through TortoisePlink.exe - can I set the key when making the tunnel so I don't have to mess with PuTTY's settings?

Plink stores the keys, that's another application. TortoisePlink is just the original Plink compiled and slightly modified so that ugly console window doesn't pop up every time.
 

- Can TortoiseSVN (or it's programs) create keys or does it need an external program?  ( (I see \ext\openssl in the repo checkout)

No, TSVN can't create keys. Sorry.
 
you should first start with the svn library (the original subversion code) and see there whether you might be able to reuse some of their code that handles the ssh connection.


Michael Cole

unread,
May 8, 2020, 3:54:37 PM5/8/20
to TortoiseSVN-dev
Hi Stefan,

- Where are the keys stored?  I think it goes through TortoisePlink.exe - can I set the key when making the tunnel so I don't have to mess with PuTTY's settings?

Plink stores the keys, that's another application. TortoisePlink is just the original Plink compiled and slightly modified so that ugly console window doesn't pop up every time.

When TortoisePlink starts the connection, it sends a public key from a well-known place to start securing the connection.  I want it to send a key saved from the SSH config section.  So it could either write to the well-known location - or use the configured one first.

From TortoisePlink's help dialog, something like:

tortoiseplink [host] -i [keyfile location]

 

- Can TortoiseSVN (or it's programs) create keys or does it need an external program?  ( (I see \ext\openssl in the repo checkout)

No, TSVN can't create keys. Sorry.
 

Windows 7 and later already has ssh-keygen installed at: C:\Windows\System32\OpenSSH\ssh-keygen.exe  so we could shell that command to generate the keys like just like plink to make the connection.

It looks like most of the heavy lifting has been done.  Would you be interested in a patch for this?


Stefan

unread,
May 9, 2020, 2:35:17 AM5/9/20
to TortoiseSVN-dev


On Friday, May 8, 2020 at 9:54:37 PM UTC+2, Michael Cole wrote:
Hi Stefan,

- Where are the keys stored?  I think it goes through TortoisePlink.exe - can I set the key when making the tunnel so I don't have to mess with PuTTY's settings?

Plink stores the keys, that's another application. TortoisePlink is just the original Plink compiled and slightly modified so that ugly console window doesn't pop up every time.

When TortoisePlink starts the connection, it sends a public key from a well-known place to start securing the connection.  I want it to send a key saved from the SSH config section.  So it could either write to the well-known location - or use the configured one first.

From TortoisePlink's help dialog, something like:

tortoiseplink [host] -i [keyfile location]


you can configure the ssh client that svn uses like that if you like.
e.g. in the TSVN settings dialog, network, ssh client: just put something like this in there:
tortoiseplink -i path\to\keyfile
 
 

- Can TortoiseSVN (or it's programs) create keys or does it need an external program?  ( (I see \ext\openssl in the repo checkout)

No, TSVN can't create keys. Sorry.
 

Windows 7 and later already has ssh-keygen installed at: C:\Windows\System32\OpenSSH\ssh-keygen.exe  so we could shell that command to generate the keys like just like plink to make the connection.

It looks like most of the heavy lifting has been done.  Would you be interested in a patch for this?


No, but generating keys is not the job of an svn client. I don't like the idea of implementing things that are not part of the main job of TSVN.

Stefan

Michael Cole

unread,
May 9, 2020, 1:06:01 PM5/9/20
to TortoiseSVN-dev on behalf of Stefan
Got it Stefan, thanks for your help!

--
You received this message because you are subscribed to the Google Groups "TortoiseSVN-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tortoisesvn-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn-dev/8eee384e-bd96-4d2c-9d6d-0d26e78e5ad3%40googlegroups.com.


--
Michael Cole



Reply all
Reply to author
Forward
0 new messages