gitgithubnetbeanspersonal-access-tokenprivate-repository

Clone a Private Github Repo with a Personal Access Token Netbeans


The connection between my NetBeans project and its respective GitHub repo has always been seamless, until now. I understand that GitHub implemented an update on August 14th which requires users to use a Personal Access Token to access their GitHub repositories. I have never used this before as I am relatively new to GitHub. All I want to do is be able to push my changes to GitHub, but now, whenever I do that, I get this error: https://5-pengoo@github.com/5-pengoo/Therabot: git-receive-pack not permitted on 'https://5-pengoo@github.com/5-pengoo/Therabot/'

Although my project is private, I own the project, so I should not be denied access.

I tried looking at questions like Git clone always asks for Personal Access Token (private repo) but it didn't work out for me. For this question, for instance, it gives solutions in the terminal instead of NetBeans and could be outdated.

Please let me know if you need any other details, otherwise, I look forward to hearing from you.


Solution

  • Open your Netbeans project.

    Open an internet browser, log in to your GitHub account and create a "Personal access token" (see GitHub doc, super easy), copy it.

    Then in Netbeans select your project and use the Git menu to push or pull from the GitHub repo: Netbeans will prompt you for a user and a password. Use your GitHub login name and the Personal access token as a password.

    Netbeans will save it on your computer, it won't ask it anymore, unless access rights of your GitHub account change.