'How to pull from GitHub using token

Until today I've been using GitHub Desktop to navigate git and GitHub. However, I decided this morning to attempt some tasks from the terminal on my Mac. I started with navigating to my repo folder and then running git pull. I was kindly referred to this page explaining about personal tokens etc etc.

I duly created a token and then used homebrew to install gh and run gh auth login. Everything went swimmingly and I'm now logged onto GitHub.

However, how do I now execute my pull? I've tried git pull again but that asks me for my username and password again and I go round in a big circle to be referred to the link above :( I've had a look at gh -help but I couldn't see a pull command...

  • Git: 2.15
  • MacOS: 12.1


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source