I have created a github codespace that I attached (I think) to a particular github repository that I own. However, when I attempt to do a git push to the remote repo, I'm getting the following error:
remote: Permission to <username>/<reponame>.git denied to <username>.
fatal: unable to access 'https://github.com/<username>/>reponame>/': The requested URL returned error: 403
How can I check that the codespace is attached to the repo in question? Any other debugging hints?
Thanks
I see that you are trying to link codespace to some other repository that you own. But by default, Codespace limits access to only repository from which it was created.
So you can either create a brand new codespace for your other repository.
OR
If you want to access other repository from your existing codespace then you will have to update your
devcontainer.json
to set additional permissions to access this other repository.Please refer to these official docs -
I hope this answers your question.