Wireshark-dev: Re: [Wireshark-dev] Setting up git for gerrit

From: Paul Offord <Paul.Offord@xxxxxxxxxxxx>
Date: Mon, 30 Nov 2015 10:58:43 +0000

Hi Graham,

 

OK – I’ve tried all of the changes below but still no joy.  So, how do I do this with HTTPS connections instead?  I’ve tried:

 

C:\Development\Wireshark>git remote set-url origin https://code.wireshark.org/USERNAME/wireshark

 

but that doesn’t work.  If I try this URL through a browser it just throws a 404 Page not found.

 

Thanks and regards…Paul

 

 

From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Graham Bloice
Sent: 30 November 2015 09:27
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Setting up git for gerrit

 

 

 

On 30 November 2015 at 09:04, Paul Offord <Paul.Offord@xxxxxxxxxxxx> wrote:

Just to complete the story so far.  SSH appears to be set up correctly.  I get this:

 

C:\Development\Wireshark>ssh -p 29418 USERNAME@xxxxxxxxxxxxxxxxxx

Enter passphrase for key '/home/my_userid/.ssh/id_rsa':

 

  ****    Welcome to Gerrit Code Review    ****

 

  Hi Paul Offord, you have successfully connected over SSH.

 

  Unfortunately, interactive shells are disabled.

  To clone a hosted Git repository, use:

 

  git clone ssh://USERNAME@xxxxxxxxxxxxxxxxxx:29418/REPOSITORY_NAME.git

 

Connection to code.wireshark.org closed.

 

If I then try git review I get this:

 

C:\Development\Wireshark>git review

Problem running 'git remote update origin'

Fetching origin

Permission denied (publickey).

fatal: Could not read from remote repository.

 

Please make sure you have the correct access rights

and the repository exists.

error: Could not fetch origin

 

There definitely seems to be a problem with the linkage between git and SSH.

 

 

Paul,

 

You have Cygwin on your path and are using Cygwin ssh, I think git *might* prefer to use it's own copy and thus want to see your private key in %HOMEPATH%\.ssh ($HOME\.ssh for PowerShell) which I don't think is where Cygwin will stash it.  Personally, I *don't* have Cygwin on my path, it's not required to be on there for a Windows CMake build and in the distant past it has caused issues.

 

Before the git changes, 2.6 IIRC, the git version of ssh was in the git cmd directory which git normally puts on your path.  Git can optionally add the usr/bin element to your path as well, but again I'm not a fan of that as it then adds all the msys tools on your path which *might* cause issues.

 

With git 2.6.x I modify git-review to use the absolute path to the git version of ssh, e.g. in C:\Python27\Lib\site-packages\git_review\cmd.py, in function query_reviews_over_ssh, modify the path to ssh in the run_command_exc() call to be r"\C:\Program Files\git\usr\bin\ssh.exe".  This might need adjusting for your paths.

 

You can use Gerrit without git-review, but IMHO that's just unnecessary brain torture.

 

--

Graham Bloice


______________________________________________________________________

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

Any views or opinions expressed are solely those of the author and do not necessarily represent those of Advance Seven Ltd. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Advance Seven Ltd. Registered in England & Wales numbered 2373877 at Endeavour House, Coopers End Lane, Stansted, Essex CM24 1SJ

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________