今天更換了一台電腦,重新配置了SSH keys
;但是在push
得時候提示我輸入用戶名和密碼
taodeMacBook-Pro:my_trip_proj tao$ git push origin master
Username for 'https://github.com':
Password for 'https://github.com':
這就尷尬😅了撒
難道是我配置❌了?
於是我又重新執行$ ssh-keygen -t rsa -C "your email"
命令生產ssh key;
然后在重新上傳,但是依然不行;why?
原來是我使用https來push得原因
於是果斷干掉,改用ssh的方式
taodeMacBook-Pro:my_trip_proj tao$ git remote rm origin
taodeMacBook-Pro:my_trip_proj tao$ git remote -v
在GitHub對應的倉庫 點擊 User SSH
然后再復制地址,如下圖
添加倉庫地址
再次執行push就沒問題了