1. 程式人生 > >git 每次pull 私有倉庫要求輸入username 和 password 咋辦?

git 每次pull 私有倉庫要求輸入username 和 password 咋辦?

兩種情況,

1 對於已經拉完的工程

git remote rm origin #刪除原有遠端關聯

git remote add origin https://username:password@github.com/your_repo_path.git  #設定新的關聯依賴(注意將自己的賬號密碼新增到新的url中)

2 新clone

git clone https://username:password@github.com/your_repo_path.git