How can I debug git/git-shell related problems?

前端 未结 8 1576
说谎
说谎 2020-11-22 15:16

How can I have some debug information regarding git/git-shell?

I had a problem, that user1 could clone a repository without problem, while user2<

8条回答
  •  名媛妹妹
    2020-11-22 15:43

    If its over SSH, you can use the following:

    For a higher debug level for type -vv or -vvv for debug level 2 and 3 respectively:

    # Debug level 1
    GIT_SSH_COMMAND="ssh -v" git clone 
    
    # Debug level 2
    GIT_SSH_COMMAND="ssh -vv" git clone 
    
    # Debug level 3
    GIT_SSH_COMMAND="ssh -vvv" git clone 
    

    This is mainly useful to handle public and private key problems with the server. You can use this command for any git command, not only 'git clone'.

提交回复
热议问题