I am following the following process to duplicate a repository found here:
https://help.github.com/articles/duplicating-a-repository/
git clone --bare https://github.com/exampleuser/old-repository.git
Success.
cd old-repository.git
And this:
git push --mirror https://github.com/exampleuser/new-repository.git
I then get the error in my terminal that:
remote: Repository not found.
fatal: repository 'https://github.com/exampleuser/new-repository.git/' not found
I seems like I am missing a simple step. How can I find out what is going wrong and fix it.
Add a new remote to your old repository and push your source to new remote repository.
$ 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
Had the same problem.
Create a new repo in the destination location before you try to push to it.
Don't initialize it with a readme, just create.
Then retry git push --mirror https://github.com/exampleuser/new-repository.git
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.