注意!注意!仓库无法推送代码解决方案
为了配合国家法律法规和业务发展的要求,CSDN Code 代码托管平台域名由 codechina.csdn.net 变更为 gitcode.net。.
变更后会出现了部分旧版本插件创建的仓库无法正常推送代码的情况,现在我们紧急提供解决方案:
- 使用 git remote -v 查看自己仓库的 remote 地址;
- 如果仓库 remote 为 codechina.csdn.net 地址,则删除该remote,如 git remote rm origin ;
- 将2中删除的remote URL 中的codechina.csdn.net 替换为 gitcode.net ,然后将其添加到仓库中,如:git remote add origin 替换后的地址。
您也可以将 https 格式的 remote 替换为 ssh 格式,ssh 方式更加编辑且安全,我们极力推荐用户使用 ssh remote,方法参考:https://gitcode.net/gitcode/help-docs/-/wikis/docs/ssh