git behind proxy: remote HEAD refers to nonexistent ref, unable to checkout

后端 未结 4 1873
孤街浪徒
孤街浪徒 2021-02-01 06:30

When trying to clone ANY repository via https from github, we get:

git clone https://github.com/rails/rails.git
Cloning into rails...
remote HEAD refers to nonex         


        
4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-01 06:54

    A workaround found at the linked Ubuntu bug:

    add the following to ~/.gitconfig or /etc/gitconfig

    # Workaround for bug when using SSL and HTTP proxy (LP #940431)
    [url "http://"]
     insteadOf = "https://"
    

    No longer necessary starting with 12.04.

提交回复
热议问题