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
there might be multiple causes for the issue
- If the issue is with your ssh identity, go through @onkar-m18 answer here
- If ssh key is not added to hosting server, go through @lovekush-vishwakarma answer here