- Download and install gh from https://cli.github.com/
- Enter gh repo create and follow the instructions.
- Check the authentication status gh auth status
- Login using gh auth login. If you encounter authentication issues then follow the steps on authentication below before attempting to upload a repository.
browse to https://github.com and create it using the web interface
New repo

Repo preloaded with readme and licence

Instructions if the repository was empty:
echo "# AgileProjects" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/yonush/AgileProjects.git
git push -u origin mainRefer to the Tokens below for authentication.
Instructions for an existing local repository:
git remote add origin https://github.com/yonush/AgileProjects.git
git branch -M main
git push -u origin mainAuthenticating with a token:
git remote set-url origin https://yonush:<MYTOKEN>@github.com/yonush/AgileProjects.gitAuthentication with gh:
- Download and install gh from https://cli.github.com/
- With the web gh auth login --web
- git config --global credential.helper "!gh auth git-credential" (my default helper !"C:/go/git/mingw64/bin/git-credential-manager.exe")
- With a token echo your_token | gh auth login --with-token
Personal Access Token (Manual) git config credential.helper store git push origin main Enter username and token when prompted
gh auth status gh auth logout
-
Log in to GitHub:
Go to GitHub and sign in to your account.
-
Access Token Settings:
Click on your profile picture in the upper-right corner and select Settings. In the left sidebar, click Developer settings. In the left sidebar again, click Personal Access Tokens then Tokens (Classic).
-
Generate New Token:
Click on Generate new token (classic). Give your token a descriptive name (e.g., "Git push access"). Select the scopes or permissions you need. For pushing to repositories, you will need repo (full control of private repositories).
-
Generate and Copy Token:
Click Generate token. Copy the token to your clipboard. NOTE: You won't be able to see this token again, so store it securely.
