Github试图避免每次都被要求提供凭据
我在实验室服务器上工作,每次尝试推拉时Github都会问我的用户名和密码。在完成一些搜索之后,我尝试了这个命令Github试图避免每次都被要求提供凭据,git,github,Git,Github,我在实验室服务器上工作,每次尝试推拉时Github都会问我的用户名和密码。在完成一些搜索之后,我尝试了这个命令git remote set url origingit@github.com:username/repo.git其中username替换为我的电子邮件地址。现在我似乎能够推进回购协议。有没有关于如何解决这个问题的建议?提前谢谢 像git@github.com:username/repo.git使用SSH协议进行身份验证。您需要创建SSH密钥并将公钥上载到GitHub。详细说明如何执行此
git remote set url origingit@github.com:username/repo.git
其中username
替换为我的电子邮件地址。现在我似乎能够推进回购协议。有没有关于如何解决这个问题的建议?提前谢谢
像
git@github.com:username/repo.git
使用SSH协议进行身份验证。您需要创建SSH密钥并将公钥上载到GitHub。详细说明如何执行此操作。类似git@github.com:username/repo.git
使用SSH协议进行身份验证。您需要创建SSH密钥并将公钥上载到GitHub。详细说明如何执行此操作。如果您使用HTTP,并且不介意您的凭据存储在plaintex中,则可以使用HTTP基本身份验证:
https://username:password@git-repo/repo.git
#create a new remote with the authenticated url
git remote set-url authrepo https://username:password@git-repo.com/repo.git
#delete the old remote
git remote remove <your ocurrent remote>
#call the old remote the same as new remote
git remote rename authrepo <your current remote>
https://username:password@吉特回购/repo.git
#使用经过身份验证的url创建新的远程服务器
git远程设置url authrepohttps://username:password@git-repo.com/repo.git
#删除旧的遥控器
git远程删除
#调用旧远程设备与调用新远程设备相同
git远程重命名authrepo
如果您使用HTTP,并且不介意您的凭据存储在plaintex中,则可以使用HTTP基本身份验证:
https://username:password@git-repo/repo.git
#create a new remote with the authenticated url
git remote set-url authrepo https://username:password@git-repo.com/repo.git
#delete the old remote
git remote remove <your ocurrent remote>
#call the old remote the same as new remote
git remote rename authrepo <your current remote>
https://username:password@吉特回购/repo.git
#使用经过身份验证的url创建新的远程服务器
git远程设置url authrepohttps://username:password@git-repo.com/repo.git
#删除旧的遥控器
git远程删除
#调用旧远程设备与调用新远程设备相同
git远程重命名authrepo
谢谢。添加SSH密钥后,我现在得到错误:yzr@umich.edu/repo不是有效的存储库名称
。您知道我应该如何更改服务器端的回购名称吗?谢谢。添加SSH密钥后,我现在得到错误:yzr@umich.edu/repo不是有效的存储库名称
。你知道我应该如何在服务器端更改回购协议的名称吗?请改为发布文本本身。请改为发布文本本身。