GNU/Linux Desktop Survival Guide
by Graham Williams
Git Create Repository
20200316 Git services provide browser based interfaces to create new repositories and to initialise those repositories. To create a new repository under your account on GitHub the GitHub Command Line Tool can be used. This provides the gh command for the task:
$ gh repo create kayon/pygym --public --description "The Python Gym" Notice: authentication required Press Enter to open github.com in your browser... Authentication complete. Press Enter to continue... Created repository kayon/pygym on GitHub Create a local project directory for kayon/pygym? Yes Initialized empty Git repository in /home/kayon/pygym/.git/ Initialized repository in './pygym/' $ cd pygym $ echo "# pygym" >> README.md $ git add README.md $ git commit -m "Initial import" $ git push --set-upstream origin master
The push command will prompt for a username and password. This fails for me perhaps due to two factor authentication.