說明使用的是https方式提交代碼,如果是ssh方式,只需要ssh key就可以。
方法一:
git config --global credential.helper store
只需要輸入一次用戶名和密碼,後面記住自動填充
方法二:
刪除https方式提交,使用ssh方式
git remove rm origin
git remote add origin [email protected]:$username$/$repository_name$
git push -u origin master
# if you don't have the permission
ssh-keygen -t rsa -C 'username'
# id_rsa.pub is stored in .ssh