Git - No such remote ‘origin‘(git remote set-url origin ‘xxx.git‘)

简介: Git - No such remote ‘origin‘(git remote set-url origin ‘xxx.git‘)

报错分析

git remote set-url 是修改远程的 url 的命令,但这里有一个大前提

要原先就有一个远程 URL 才能修改生效,说明项目根本就没设置过远程地址

解决方案

所以直接增加一个远程 URL 即可


git remote add origin "xxx.git"
目录
相关文章
|
12天前
|
开发工具 git
7-5git reset --hard origin/master代表什么意思
7-5git reset --hard origin/master代表什么意思
|
2月前
|
开发工具 git
IDEA中怎么使用git下载项目到本地,通过URL克隆项目(giteegithub)
IDEA中怎么使用git下载项目到本地,通过URL克隆项目(giteegithub)
133 0
|
5月前
|
网络安全 开发工具 git
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
71 0
|
4月前
|
存储 开发工具 git
解决“hint: the same ref. If you want to integrate the remote changes, usehint: ‘git pull‘ before pus”
解决“hint: the same ref. If you want to integrate the remote changes, usehint: ‘git pull‘ before pus”
|
11月前
|
网络安全 开发工具 git
git clone之报错git@gitee.com:Permission denied (publickey).fatal: Could not read from remote repository
git clone之报错git@gitee.com:Permission denied (publickey).fatal: Could not read from remote repository
440 0
|
5月前
|
开发工具 git
If you are using the git profile, you need to set a Git URI in your configuration. If you are using
If you are using the git profile, you need to set a Git URI in your configuration. If you are using
116 0
|
11月前
|
开发工具 git
解决Git push提交时Permission denied(publickey).Could not read from remote...的问题
解决Git push提交时Permission denied(publickey).Could not read from remote...的问题
180 0
|
5月前
|
开发工具 git
git使用笔记-修改url并与远端库合并
git使用笔记-修改url并与远端库合并
28 1
|
5月前
|
网络安全 数据安全/隐私保护
解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas
解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas
407 0
|
5月前
|
开发工具 git
完美解决git 执行git push origin master指令 报错command not found
完美解决git 执行git push origin master指令 报错command not found
122 0