I'm using a kit to learn about Raspberry Pi. The kit had a GitHub repository with code to learn from. I forked their repository on my GitHub account, cloned it to the Raspberry Pi, and am working with my fork. I also set my username and email with git config. I'm able to use Git locally to commit changes, but I haven't been able to push my changes back to my fork.

I've set my user ID and email, and the remote is set correctly, confirmed by the git remote --verbose command. But when I try to push either the main branch or a new branch with git push --set-upstream origin <<branch-name>> the shell just hangs. I've given it plenty of time (>20 minutes) to complete, but nothing happens. The only way I get out is to press Ctrl-C.

How can I push my local changes to my GitHub account?

1 Answer 1


Your question may be "off topic" for RPi SE, but I've had to address this recently also - here's what I learned:

Effective August, 2021, GitHub requires token-based authentication for git operations on repos - userid & passwords are no longer allowed. This article outlines how to create a personal access token, and use it from the command line w/ git

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.