I know similar questions have been asked, but the advice I found there didn’t help me to resolve the issue. The issue is that I can’t push anything to Github, not even to my own repositories, although I am using the same procedure I was using for years. So, here it is.
I retrieve my own repository with:
git clone https://github.com/Niceno/PyNS
This works fine, it is a public repository, no issues whatsoever. Please also note that my Github username is
Niceno, it is my repository I am cloning. To make sure I have the origin properly set, I also issue the command:
git remote set-url origin https://Niceno@github.com/Niceno/PyNS.git
I change a single file, commit the changes, and attempt to do a push with:
When prompted for a password, I type my Personal Access Token (PAT), which is new and still valid, but I get the response:
remote: Permission to Niceno/PyNS.git denied to Niceno. fatal: unable to access 'https://github.com/Niceno/PyNS.git/': The requested URL returned error: 403
I work on Linux Ubuntu 20.04.3 LTS. I work from a terminal and issue all the commands from a shell, no additional GUIs or apps or what have you. I use https protocols and never bothered to deal with SSH authentication. I am fine to type my PAT every time.
My .git/config file looks as this:
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = https://Niceno@github.com/Niceno/PyNS.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master
If I issue commands:
git config --global user.name git config --global user.email
which are both correct, I set these in
.bashrc file with:
git config --global user.name "Niceno" git config --global user.email "email@example.com"
I am working from home and am not behind any firework. I tried the same from a computer inside my employer’s network, and the outcome was the same. If I edit files directly on Github web page, I can save the changes without problems.
What could be going wrong here? I am running really desperate, I can’t work without Github. I am using the same practices I did for years, and out of a sudden they don’t seem to work any more.