解決git clone一直需要輸入密碼的問題

情況

雖然在GitHub添加了SSH keys,但是在執行git clone https://*命令時,仍然會提示需要輸入密碼,如下:

git clone https://github.com/yansheng8*
Cloning into '*'...
Username for 'https://github.com': 

理解

之前配置SSH,需要使用ssh形式的URL(即[email protected]:*開頭的)進行clone。
在這裏插入圖片描述

# 配置SSH
#1)本地生成key
ssh-keygen -t rsa -C "[email protected]"

#2)查看生成的key 
cat cat  ~/.ssh/id_rsa.pub

#3)在github個人賬戶配置key
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章