MATLAB: Do I get the error “git-receive-pack unauthorized”, when I try to push to the git repository

controlgithubMATLABsource

I have successfully cloned a git repository and commited some changes to my local copy. However, when I try to push my changes I get the error message:
git-receive-pack unauthorized
My login username and password are correct, how do I fix this?

Best Answer

This error message indicates that your user account does not have write permissions to the repository, and you are only able to read from it.
You can verify that this is an issue with permissions by trying to push your changes from the command line,* not* from MATLAB:
> cd <path to local sandbox>
> git push
If the error persists when using git outside of MATLAB, then the problem is certainly that you lack write permissions on the repository.
To fix the problem, you need to ask whoever manages the repository to give you write access.