Skip to content

Instantly share code, notes, and snippets.

@kopp
Created July 23, 2024 22:23
Show Gist options
  • Save kopp/47cd9aef00beb439b347b7675645728d to your computer and use it in GitHub Desktop.
Save kopp/47cd9aef00beb439b347b7675645728d to your computer and use it in GitHub Desktop.
git push and pull with https

How to git push and git pull via https://

  1. Create repository on github.com
  2. Add the remote (do not use set-url, rather delete and then add) including your username: git remote add origin https://<username>@github.com/<name>/<repo>.git
  3. Create an access token with scope Contents Read and Write (and if you want to work with workflows also Workflows Read and Write) via https://github.com/settings/tokens?type=beta
  4. Use git config push.autoSetupRemote true
  5. git push, then enter the PAT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment