Git--Git clone時遇到fatal: protocol '––https' is not supported


一、問題由來

  今天在Windows上學習git clone將遠程版本庫克隆到本地時的操作不當引起fatal: protocol '––https' is not supported,是我們在這方面常犯的一個錯誤。

二、解決辦法

stackoverflow上找到了解決方案和原因,其中是這么寫到的:

 

You tried to paste it using
CTRL +V
before and it didn’t work so you went ahead and pasted it with classic
Right Click - Paste**.
Sadly whenever you enter CTRL +V on terminal it adds
a hidden ^?
(at least on my machine it encoded like that).
the character that you only appears after you
backspace
(go ahead an try it on git bash).
So your link becomes ^?https://...
which is invalid.

 

在我們使用ctrl + c/v 進行復制粘貼操作,在git bash中沒有效果,下意識右鍵粘貼,但是不幸的是,使用 CTRL +V會在Git Bash 中添加一個隱藏的符號 ^?。所以在git bash中可能出現

 

$ git clone ^?https://github.com/shi-bash-cmd/myweather.git

 

鏈接前面多了符號,協議變成了^https,肯定不能克隆成功,提示協議不支持。跟linux系統中的復制粘貼不同,在命令行中盡量小心使用ctrl + c/v

三、參考鏈接

 

https://stackoverflow.com/questions/53988638/git-fatal-protocol-https-is-not-supported

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM