Project

General

Profile

Bug #5215

gitCheckout uses SSH even when SSH does not work (in particular ways)

Added by Gianluca Petrillo over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
01/16/2014
Due date:
% Done:

0%

Estimated time:
Duration:

Description

I premise than I don't know the underlying reasons for the choice of the
following code, so I might well be writing something silly.

I read in
/grid/fermiapp/products/larsoft/mrb/v0_05_04/bin/gitCheckout.sh
the function run_git_command().

It chooses between SSH and HTTP, according to the outcome of the test greeting:

ssh p-${rbase}@cdcvs.fnal.gov "echo Hi"

If it finds "Permission" in the output (could be "Permission denied"; or
"Permission granted"), then it goes SSH.

When I try to use it from my laptop to check out "larsim":

$ ssh p-larsim@cdcvs.fnal.gov "echo Hi" 
Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

it slams the door on my face, maybe because p-larsim user does not exist, so it
chooses HTTP.
When I try to check out 'larsoft':

$ ssh p-larsoft@cdcvs.fnal.gov "echo Hi" 
Connection closed by 131.225.108.132

it still slams the door on my face in a different way (I am not sure why, that's
another problem), but doesn't smell "Permission" denial and tries to use SSH
(which of course fails). My problem would be solved by a different check, like:
if ! ssh p-${rbase}@cdcvs.fnal.gov "echo Hi" >& /dev/null ; then
    ##echo "you do not have read-write permissions for the repository" 
    myGitCommand=$gitCommandRO
fi

or similar.

History

#1 Updated by Lynn Garren about 7 years ago

  • Status changed from New to Feedback
  • Assignee set to Lynn Garren

Apologies for missing this. Had to set the new issue alert.

Is this still a problem for you? If so, please tell us a) what OS you see this problem on and b) exactly what you type that when you see the problem.

Please talk to us before trying to solve something like this yourself so you can avoid chasing a red herring, which is apparently what you attempted.

#2 Updated by Lynn Garren about 7 years ago

  • Status changed from Feedback to Resolved

The immediate issue was resolved by giving Gianluca the appropriate write access.

#3 Updated by Lynn Garren about 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF