ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Our Git URLs: https vs ssh

From: Peter Wu <peter@xxxxxxxxxxxxx>
Date: Fri, 02 Jan 2015 23:53:21 +0100
Hi Stephen,

On Friday 02 January 2015 15:34:46 Stephen Fisher wrote:
> I've seen two URLs for getting Wireshark via Git:
> 
> 	https://code.wireshark.org/review/wireshark
> 
> 		and
> 
> 	ssh://my.username@xxxxxxxxxxxxxxxxxx:29418/wireshark 
> 
> 
> The first one is mentioned in the developer's guide and elsewhere, while 
> the second is mentioned for using Gerrit to submit changes.  Since I 
> submit changes to Gerrit, I've always used the SSH URL even for the 
> initial pull (clone).  Can users use the HTTPS one initially and then 
> easily change to the SSH one if they decide to contribute?  I'm still 
> used to the SVN days where committers had to use the SSH URL to get into 
> the SVN repo and everyone else used the public URL.

You can change the remote with `git remote set-url`. SVN has only one
URL AFAIK, but git can configure a different one depending on the
direction:

$ git remote -v
origin  https://code.wireshark.org/review/wireshark (fetch)
origin  ssh://Lekensteyn@xxxxxxxxxxxxxxxxxx:29418/wireshark (push)

To change the fetch URL, you can use this command:

    git remote set-url origin https://code.wireshark.org/review/wireshark

To set the push URL, use this instead:

    git remote set-url --push origin ssh://...

Verify with `git remote -v`.

Now you can fetch changes without having to unlock your SSH key.

Kind regards,
Peter