remote: Write access to repository not granted. fatal: unable to access

Try and recreate a PAT(Personal Access Token) with, as scope, the repo ones.
And, for testing, chose an expiration date “No Expiration“, to be sure it remains valid.
(Note: Since Oct. 2022, you now have fine-grained personal access tokens, which must have expiration date.)
(gdvalderrama adds in the comments: The max expiration date is 1 year and has to be manually set)

That token should start with ghp_...: it should then authenticate you properly, allowing you to clone the repository, and push back to it.

Note: a token is akin to a password (but can easily be revoked/regenerated), so you should not use any other tokens but your own.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)