Create a repository from command line interface using bash and curl api
xxxxxxxxxx
curl -u "<username>" https://api.github.com/user/repos -d '{"name":"<repository-name>", "auto_init":"true", "default_branch":"main"}'
After entering, github may request your password or your Personal Access Token
xxxxxxxxxx
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:alexpchin/<reponame>.git
git push -u origin master
xxxxxxxxxx
gh repo create repositoryname --public
#to use gh install github cli
#link for installation from differnet os
#https://cli.github.com/manual/installation
#if windows use
choco install gh
#after installation login to github using github cli
gh auth login
xxxxxxxxxx
echo "# project name" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/User/repo
git push -u origin main
xxxxxxxxxx
curl -i -H 'Authorization: token <your_token>' -d '{"name":"csreNewProj"}' https://api.github.com/user/repos