Github 如何使用gitbash登录我的回购协议?
我已经将自己添加到git bash程序中,但在google上找不到如何登录Github 如何使用gitbash登录我的回购协议?,github,Github,我已经将自己添加到git bash程序中,但在google上找不到如何登录 $ git config --global user.name "myname" $ git config --global user.email myemail@example.com user.name和user.email与登录凭据无关。 它们是附加到提交的元数据 要“登录”,您需要添加一个远程url,该url将使用您的凭据,https或ssh凭据 git remote add origin https://Us
$ git config --global user.name "myname"
$ git config --global user.email myemail@example.com
user.name和user.email与登录凭据无关。
它们是附加到提交的元数据 要“登录”,您需要添加一个远程url,该url将使用您的凭据,https或ssh凭据
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\u rsa
和id\u rsa.pub
私钥和公钥,公钥注册在您的GitHub帐户中:请参阅“”)
请参阅“”中的更多内容
如中所述,如果
origin
已经存在,请使用而不是git remote add origin
来添加到该文件中。如果您已经克隆了repo,并且出现错误“远程源已存在”,则使用“git set url”而不是“git add”