Issue
I'm running Netbens 12.4 and OpenJDK 16.0.2 and also tried 11.0.02 on a Win 10 laptop. I've been a long time Netbeans user and never run into this problem. Just installed it on my laptop for the first time. Keep getting "invalid credentials for repository at..." It's a private repository.
Was trying to push a repository to github that kept failing. I can use git on command line and desktop client. Checked the proxy configuration and set it to No Proxy in case it wasn't picked up in the settings. Tried the "Test Connection" and I got an exclamation in a red stop sign. No message. Couldn't find any error messages. Nothing notable in messages.log. I'm not using a proxy and I tried disabling the Windows Defender firewall.
I don't even know where to start to look for what might be wrong as I can't get any errors.
I can download maven dependancies fine in netbeans. Edit: I can also clone a public respository.
I'm using the username and password I use to log into the github website.
Solution
I'm not sure if this is the intended behavior but it doesn't work with the password I use to log into github.com via the browser and other applications. I needed to create a Personal Access Token on and use that as the password.
- Log into github.com and in the top right click on user name and select Settings
- Scroll down and click on Developer Settings on the left sidebar menu
- On the left sidebar click on Personal Access Tokens
- Click on Generate New Access Token
- I made a note to know it was for netbeans
- Set the expiration you want, and make sure to grant access to all the repo items
- It will generate a token. Copy this token and be aware that you can't access this again but you can regenerate a new one.
- Back in Netbeans when trying to access git remote use the token you just copied instead of the password.
Answered By - Kerdos Media
Answer Checked By - Willingham (JavaFixing Volunteer)