提交代码可能会出现点小问题。
(1) github打不开或者很慢。参考博客修改hosts文件。
GitHub经常打不开或者访问慢究极解决方法,真实有效哦! - 云+社区 - 腾讯云 (tencent.com)
(2) Support for password authentication was removed ...
解决方式是曲线救国,注册码云,在码云中加入github的仓库,然后将origin更新为码云上的远端仓库地址。重新提交。
$ git remote rm origin
$ git remote add origin https://gitee.com/banjiu518/gitsdemo.git
下面 从远端库拉取代码
先做准备工作:在码云上将远端库文件内容做一点点修改。
执行代码的拉取操作,发现拉取失败,提示:could not read from remote repository
。
24724@LAPTOP-OCSC7S98 MINGW64 /e/gitworkspace/gitviedo
$ mkdir pull-demo
24724@LAPTOP-OCSC7S98 MINGW64 /e/gitworkspace/gitviedo
$ cd ./pull-demo/
24724@LAPTOP-OCSC7S98 MINGW64 /e/gitworkspace/gitviedo/pull-demo
$ git init
Initialized empty Git repository in E:/gitworkspace/gitviedo/pull-demo/.git/
24724@LAPTOP-OCSC7S98 MINGW64 /e/gitworkspace/gitviedo/pull-demo (master)
$ git pull pull-demo origin
fatal: 'pull-demo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
参考博客***h。
发现配置完ssh后提示下图信息。
拉代码还是不成功。