$ git push remote: Repository not found. fatal: repository ' https://github.com/account/repository.git/ ' not found

What is the problem: I deleted the repository through the site, now when I push it it gives an error. those. I push into a new one, and it gives an error that the old one is missing (ed)

I tried different ways that did not help me, maybe you have ideas


in the hidden folder .git> config

There are such lines:

[branch "master"] remote = https://github.com/account/repository.git/ merge = refs/heads/master [remote "remote"] url = https://github.com/account/repository.git/ fetch = +refs/heads/*:refs/remotes/remote/* 

can here something can be fixed?

  • /.git/ before the dot is missing the repository name. Possibly outdated address settings in your gita - Dmitry Kozlov
  • Sorry, when adding a message, the link was overwritten, I edited - IRONteam
  • one
    Ummm ... you deleted the repository, push into it, you are told that it is not. The question is why is it not or what? You can delete a branch and push into it, it will appear. But in the missing repository in any way. - Artem Gorlachev
  • I push to another repository - IRONteam
  • those. Push into a new one, and it gives an error that the old one is missing? - Dmitry Kozlov

1 answer 1

Go to the folder and make the command git remote -v in the console and see what it displays. If the output does not have the repository you need, add it as a remote.

$ git remote add remote https://github.com/account/repository.git/

and check the state of the connected repositories like this should be:

$ git remote -v origin https://github.com/account/repository.git/ (fetch) origin https://github.com/account/repository.git/ (push) remote https://github.com/account/repository.git/ (fetch) remote https://github.com/account/repository.git/ (push)