Use SSH
Make sure that you have added ssh pub key to your Github account, and the private ssh key to your .ssh dir in the terminal. See [[2021-09-16-generate-ssh-key-for-github-git-on-termux]]
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id\_ed25519
Create personal access token
- Create a personal access token (Login Github web - Settings - Developer Option), give permissions and copy the token.
apt install gh
gh auth login
(Use ssh)
- To logout:
gh auth logout
To create a new repository
gh repo create newrepo
Answer its questions, paste code files, add and commit, push
Bonus:
To change a git URL origin
git remote set-url origin
[email protected]:username/newrespo.git
git push --set-upstream origin master