nophead / NopSCADlib

Library of parts modelled in OpenSCAD and a framework for making projects
GNU General Public License v3.0
1.2k stars 156 forks source link

No more updates to NopSCADlib from tomorrow #184

Closed nophead closed 3 years ago

nophead commented 3 years ago

Looks like I can't use GitHub from tomorrow as I apparently use a password and can't make personal access tokens work.

I don't enter a password on Windows so I must have stored it somewhere years ago. On Raspbian I have to type my password every time but it doesn't accept a token in its place. The documentation just sends me round in circles so I give up.

martinbudden commented 3 years ago

That seems a real nuisance. What has caused the password to expire?

nophead commented 3 years ago

My password hasn't expired but GitHub has deprecated passwords, so every time I use it they tell me it will stop working in June.

martinbudden commented 3 years ago

Oh dear, I might be facing the same problem.

nophead commented 3 years ago

That is every time I push from the Windows command line or GUI, where I don't specify a password and can't find out how to change it. I just logged in to my account with my password and it didn't complain.

martinbudden commented 3 years ago

I see. I think I set up some SSH keys ages ago for pushing from the command line, but I can't really remember what I did.

martinbudden commented 3 years ago

Doesn't this cover what to do?

https://docs.github.com/en/github/getting-started-with-github/getting-started-with-git/managing-remote-repositories#switching-remote-urls-from-ssh-to-https

nophead commented 3 years ago

No, because I have never used SSH for git. I am already using https.

martinbudden commented 3 years ago

The relevant part is:

The next time you git fetch, git pull, or git push to the remote repository, you'll be asked for your GitHub username and password. When Git prompts you for your password, enter your personal access token (PAT) instead. Password-based authentication for Git is deprecated, and using a PAT is more secure. For more information, see "Creating a personal access token."

Ie create the personal access token and then use it when prompted for a password. Or have you already tried that?

nophead commented 3 years ago

The problem is l am never asked for a password on Windows. On raspian l am but it won't accept my token.

martinbudden commented 3 years ago

Have you tried

git remote set-url --delete ...

to delete the url and then

git remote set-url --add ...

To add it back again?

nophead commented 3 years ago
>git remote set-url --delete origin https://github.com/nophead/NopSCADlib.git
fatal: Will not delete all non-push URLs

>git remote set-url --delete --push origin https://github.com/nophead/NopSCADlib.git
fatal: could not unset 'remote.origin.pushurl'
martinbudden commented 3 years ago

How about a different approach, try making a new clone of the repository and seeing if you can push from there.

nophead commented 3 years ago

I have just found that the reason I can't find any information on Github or git of how to change the password is because of a huge misunderstanding on my part. Git is set up to use a credential helper on Windows, which is a git component. What I didn't realise is it makes git use the Windows credential manager, which is part of the control panel. So to change the password I just need to use the control panel. The git entries look like this:

image

I thought that the git credential helper was the thing that stored the password but it has no GUI, so I couldn't work out how to change it.

martinbudden commented 3 years ago

Glad you figured this out. And that is good information to have - I wasn't aware of that either.