首页 > 其他分享 >fatal: No remote repository specified. Please, specify either a URL or a remote name from which new

fatal: No remote repository specified. Please, specify either a URL or a remote name from which new

时间:2023-01-14 21:32:58浏览次数:40  
标签:git remote name repository No github specified true


使用git从github上拉代码时出现如下错误:

fatal: No remote repository specified.  Please, specify either a URL or a

remote name from which new revisions should be fetched.

解决方法:

进入项目目录,输入:

$ git config -e

查看一下你的配置文件,可能没有url和pushurl的配置,添加一下,地址就是的github上项目的地址。

[core]  
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
url = https://github.com/xxxx/xxx.git
pushurl = https://github.com/xxxx/xxx.git

保存后再重新去执行你的命令应该就可以了。


标签:git,remote,name,repository,No,github,specified,true
From: https://blog.51cto.com/u_15936016/6007815

相关文章