我已将自己添加到git bash程序但无法在google上找到如何登录?
$ git config --global user.name "myname"
$ git config --global user.email myemail@example.com
答案 0 :(得分:2)
user.name和user.email与登录凭据无关 它们是附加到您的提交的元数据。
要“登录”,您需要添加一个远程网址,该网址将使用您的凭据,https或ssh one。
git remote add origin https://UserName:password@github.com/UserName/yourRepo.git
^
|
(credentials)
或者ssh:
git remote add origin git@github.com/UserName/yourRepo.git
(这意味着您拥有HOME/.ssh
个id_rsa
和id_rsa.pub
私钥和公钥,并在GitHub帐户中注册了公钥:请参阅“Generating SSH Keys “)
点击“Which remote URL should I use?”了解更多信息。