Monday, December 24, 2018

Permission denied error during "git push"


I was trying to push a new commit a brand new repo.
But faced this error:

remote: Permission to /  denied to .
fatal: unable to access '': The requested URL returned error: 403

The problem here , I cloned a read-only repo.


ok, now, try
git config -l

Check  remote.origin.url  in the above output.



Now, Change it something like
git remote set-url origin https://USERNAME@github.com/USERNAME/YOURREPO

So, we are making it read-write.



Now, carry out the "git push". it should work.




No comments:

Post a Comment