[英]Github Duplicating a repository: fixing remote: Repository not found
我正在按照以下过程复制此处找到的存储库:
https://help.github.com/articles/duplicating-a-repository/
git clone --bare https://github.com/exampleuser/old-repository.git
成功。
cd old-repository.git
和这个:
git push --mirror https://github.com/exampleuser/new-repository.git
然后我在我的终端中得到错误:
remote: Repository not found.
fatal: repository 'https://github.com/exampleuser/new-repository.git/' not found
我好像错过了一个简单的步骤。 我怎样才能找出问题所在并修复它。
将一个新的远程仓库添加到您的旧仓库,并将您的源代码推送到新的远程仓库。
$ cd old-repository
$ git remote add newremote https://github.com/exampleuser/new-repository.git
#pushes specific branch to remote
$ git push newremote some-branch-name
#pushes all branches to remote
$ git push newremote '*:*'
#pushes all tags to remote
$ git push newremote --follow-tags
有同样的问题。
在尝试推送到目标位置之前,在目标位置创建一个新的存储库。
不要用自述文件初始化它,只需创建。
然后重试 git push --mirror https://github.com/exampleuser/new-repository.git
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.