Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 推动分行进行私人回购_Git_Github_Git Branch_Git Push - Fatal编程技术网

Git 推动分行进行私人回购

Git 推动分行进行私人回购,git,github,git-branch,git-push,Git,Github,Git Branch,Git Push,我对一些代码进行了注释,并向其中添加了需求文件之类的内容。我已经克隆了回购协议,分支为“文档化”分支,完成了文档编制,并尝试使用以下工具推送到远程: git push origin documenting 我得到一个错误: ==> git push origin documenting remote: Repository not found. fatal: repository 'https://myurl/myrepo.git/' not found 浏览至https://my

我对一些代码进行了注释,并向其中添加了需求文件之类的内容。我已经克隆了回购协议,分支为“文档化”分支,完成了文档编制,并尝试使用以下工具推送到远程:

git push origin documenting
我得到一个错误:

 ==> git push origin documenting 
remote: Repository not found.
fatal: repository 'https://myurl/myrepo.git/' not found
浏览至
https://myurl/myrepo.git/
向我显示回购协议,因此我的URL是正确的

我在公共repo I设置中尝试了相同的命令,它可以正常工作。成功使用该命令后,我可以浏览到我的回购协议,并在其中看到新的
记录
分支和我的更改


修复此错误的最佳方法是什么?这似乎是一个权限问题。我应该请求权限,还是可以尝试其他方法?

尝试并比较在私有和公共repo的本地克隆中执行的git remote-v的输出

您甚至不能执行
git pull
(意思是
git fetch
+合并)这一事实意味着与该私有回购相关联的url不知何故是不正确的

试着把它放回去

git remote set-url origin https://myurl/myrepo.git
(后面没有斜杠)


还可以尝试一个简单的
gitls远程https://myurl/myrepo.git
(同样,没有尾随斜杠)从您想要的任何文件夹中,查看远程访问是否有效。

嗯,url有点奇怪,我想知道它是否只是一个输入错误。如果键入git remote-v,会显示什么?我看到了repo<代码>'https://myurl/myrepo.git/“
更改了我的真实URL和真实回购名称。但我在有效的公共回购协议中也看到了同样的情况。对不起,不知道,你有没有尝试通过UI在实际回购协议上创建分支,然后再推动?我会的,但我试图了解它如何在公共回购协议上工作,而不是在我试图首先参与的回购协议中。FWIW,我也不能拉。mmmh,可能与权限有关,你通过控制台克隆了repo吗?
git ls remotehttps://myurl/myrepo.git
显示可用的引用。我使用了
git远程设置url源https://myurl/myrepo.git
它现在可以工作了。我不知道为什么。比较一个
git remote-v
prior的输出,给出相同的回购名称。谢谢你的帮助,我已经记下了你的建议作为答案。