查看remote狀態,將http改爲SSH
解決此類問題:unable to access;Failed connect to github.com
git remote -v
origin https://github.com/USERNAME/REPOSITORY.git (fetch)
origin https://github.com/USERNAME/REPOSITORY.git (push)
git remote set-url origin git@github.com:USERNAME/OTHERREPOSITORY.git
重置作者信息,修改SSH公匙:
git config --global user.email "[email protected]"
git config --global user.name "your name"
ssh-keygen -t rsa