Your git URL might have changed. Change the URL in the local directory by using the following command.
for HTTPS protocol,
git remote set-url origin https://github.com/username/repository.git
for SSH protocol
git remote set-url origin git@github.com:username/repository.git
Please also check:
- Repo is private or public? If it’s private then ask owner to add you as a maintainer.
- Repo URL is valid or not?
I hope you got the answer. Cheers.