[1]CoderDave, How to Create a Personal Access Token in GitHub, Mar 12, 2021, https://www.youtube.com/watch?v=SzrETQdGzBM
【轉註】Github自2021年8月13日起不再支持Git command使用密碼登錄,而需要使用token。登錄Github網頁可產生token。
Settings\Developer settings\Personal access tokens\Generate new token
默認的,Select scopes各選擇unchecked,需要勾選自己需要的操作範圍。我選repo。
點擊Generate token。之後拷貝token,並記錄在文檔。以後Git command執行中被問到Password時需要paste這個token。
一般的,修改Github repo(我是修改Github blog),先改好本地文檔,以Macbook Terminal為例,同步到遠程repo需要用到的命令为:
cd local_repo_archive
git add .
git commit -m "What I modify"
git remote set-url origin github_repo_url
git config --global user.name myusername
git config --global user.email myemailaddress
git push origin master