1

I want to push commits in GitHub. The url to the repository is https://github.com/ManuelaCarriero/NeuPipelines.

I used:

git commit -m "my commit" file

then:

git push -u origin main

I got the error:

Username for 'https://github.com': ManuelaCarriero
Password for 'https://ManuelaCarriero@github.com':
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/ManuelaCarriero/NeuPipelines/'.

I read the answers in StackOverflow and I used

git push

I put my username and then I used a token as password generated in https://github.com/settings/tokens. In this way I do not get anymore this message, however I get the error 403.

manuela@wkrm01:/media/nas_rete/Work_manuela/NeuPipelines$ git push
Username for 'https://github.com': ManuelaCarriero
Password for 'https://ManuelaCarriero@github.com':
remote: Permission to ManuelaCarriero/NeuPipelines.git denied to ManuelaCarriero.
fatal: unable to access 'https://github.com/ManuelaCarriero/NeuPipelines/': The requested URL returned error: 403

In the discussion in GitHub they suggest to modify "generic credentials" in the control panel in Windows.

This does not seem the solution that works for me because I am using MobaXterm for remote computing. Do you know how can I fix this problem in this case?

Destroy666
  • 12,350

1 Answers1

0

I had this very same 403 problem today when trying to do a git tutorial.

Yes, these days you need to generate the personal access token, which as you say you've already done.

(For interest, some useful instructions on how to do this are here: add a PAT (Personal Access Token), but to summarise:

From your GitHub account, go to Settings → Developer Settings → Personal Access Token → Tokens (classic) → Generate New Token (Give your password) → Fillup the form → click Generate token → Copy the generated Token, it will be something like ghp_sFhFsSHhTzMDreGRLjmks4Tzuzgthdvfsrta

Then in your GitHub account, select your token and ensure you have all the necessary permission checkboxes set. When generating a new token these boolean settings all default to OFF:

personal access token permissions

Click the Update Token button when you are done, then re-attempt your 'git push' command, it should work then.

AndyUK
  • 158
  • 1
  • 4