Why is this git clone command failing?

后端 未结 9 2091
挽巷
挽巷 2021-02-03 23:40

Trying to use the git clone command. My understanding (please correct if wrong) was that in order to host a Git repository you just need a machine running ssh and t

相关标签:
9条回答
  • 2021-02-03 23:43

    I tried everything, I verified my keys, paths and tools versions. Still, I was unable to clone a repo from github using "git shell" "git gui" and "tortoise git".

    I downloaded and installed "Visual Studio Tools for Git" (which required "VS2012 Update 2 CTP") and was able to clone the repo from inside Visual Studio:

    • Click "Main Menu->View->Team Explorer"
    • Click "Team Explorer->Connect To Team Projects"
    • Click "Team Explorer->Local Git Repositories Section->Clone"
    • Enter URL of Git Repo to Clone (yellow box)
    • Enter or Browse for Local Folder to Clone into
    • Click "Clone"

    After a moment, the repo was cloned. I've successfully cloned a half dozen repo's this way where msysgit, github and tortoisegit all failed to work as expected.

    0 讨论(0)
  • 2021-02-03 23:49

    I solved the problem by adding the following line to my ~/.bashrc file of the remote computer:

    export PATH=$PATH:"/usr/local/bin:/usr/local/git/bin"
    

    The problem was that $PATH did not include /usr/local/git/bin for non-interactive sessions. The addition to ~/.bashrc corrected that problem.

    0 讨论(0)
  • 2021-02-03 23:56

    I had the same problem on mac os, and I solved this by copy the git-upload-pack from /usr/local/git/bin to /bin.

    0 讨论(0)
  • 2021-02-03 23:57

    Another way would be to do:

    git clone --upload-pack /path/to/git-upload-pack ssh://user@host/~/project/path/contactdb

    0 讨论(0)
  • 2021-02-03 23:58

    I used

    git clone mysite.net:/path/to/site

    which worked for me.

    0 讨论(0)
  • 2021-02-03 23:58

    I have had same problem and without removing expired certificate all of the sadden it started working. The only thing I did differently this time was to switch WiFi from been connected to the proxy network to my private mobile hot spot. Then I run below command in the Terminal

    $ git clone https://my-login@bitbucket.org/project-folder/project-name.git
    

    Then it started cloning and requested password..

    Cloning into 'project-name'...
    Password for 'https://my-login@bitbucket.org':
    

    Repository has been downloaded..

    remote: Counting objects: 2449, done.
    remote: Compressing objects: 100% (1244/1244), done.
    remote: Total 2449 (delta 1388), reused 1999 (delta 1070)
    Receiving objects: 100% (2449/2449), 768.56 KiB | 101.00 KiB/s, done.
    Resolving deltas: 100% (1388/1388), done.
    
    0 讨论(0)
提交回复
热议问题