問題:
使用git push -u origin master 命令時 出現 :
remote: Permission to xxxxx.git denied to xxx.
fatal: unable to access 'https://github.com/ xxxxx.git/':URL .......
解決:
1. 已經 git init 初始化,文件夾中會有.git文件,如果已經git init 沒有看到 .git 文件,
點 查看 勾選 隱藏的項目:
打開.git文件中的config文件,編輯 .git/config中的url:
將config中的url中的
[remote "origin"]
url = https://github.com/git的用戶名/項目名稱
的url改為
url = https://git的用戶名@github.com/git的用戶名/項目名稱
url = https://github.com/git的用戶名/項目名稱
的url改為
url = https://git的用戶名@github.com/git的用戶名/項目名稱

改為:

2. 改完之后:git push -u origin master