华为云首页
用户手册
代码托管 CODEARTS REPO-执行git push 命令时,报错'origin' does not appear to be a git repository...:处理方法
代码托管 CODEARTS REPO-执行git push 命令时,报错'origin' does not appear to be a git repository...:处理方法
时间:2024-09-09 10:01:21
处理方法
查看远程仓库名称及路径的相关信息,删除错误的远程仓库名称,再重新添加新的远程仓库。执行如下命令:
- 查看远程仓库的详细信息,可看到代码仓库的名称,关联地址。
git remote -v
- 删除错误的origin仓库。
git remote remove origin
- 重新添加远程代码仓库地址。
git remote add origin
- 重新提交代码文件到远程代码仓库的master主干。
git push -u origin master
support.huaweicloud.com/codeartsrepo_faq/codeartsrepo_06_0012.html