不知道什么原因,这个月的github无法使用ssh提交代码,不论是公司还是家里的网络都不行,包括clone、pull和push。最后改为https方式,可以提交了。

1.删除现有SSH克隆的远程追踪:

git remote remove origin

2.添加新的HTTP克隆地址作为远程仓库:

git remote add origin https://username@hostname/project.git

3.配置credential helper存储凭据,避免每次交互式输入

git config --global credential.helper store

4.修改后第一次提交

git push --set-upstream origin master
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐