searching google, there are ways to create repo on Github.
I'm going to create new repo on github without create the repo on Github, only using git or terminal.
without creating new repo on github, there is no way to create project using only git or terminal?

- 271
- 2
- 13
-
https://stackoverflow.com/search?q=%5Bgithub%5D+create+repository+command+line – phd May 07 '20 at 11:00
2 Answers
Yes, use GitHub CLI.

- 153,029
- 25
- 195
- 336
-
when i run `gh repo create[name]`, there was error like this ```bash: gh: command not found```. – dev-assassin May 07 '20 at 09:57
-
You need to install the CLI tool, it's clearly stated in the link above. – StepTNT May 07 '20 at 10:37
-
-
1@ninjadev1030 [The installation instructions](https://github.com/cli/cli#installation) and you can [also download a precompiled version of the latest release](https://github.com/cli/cli/releases). – Schwern May 07 '20 at 19:14
-
Yes you can create a repository using terminal. With two things Github Api and Curl
If you want to find out whether curl in installed in your PC or not?. you just need to type curl -help
in your terminal. If no error shows that it is installed already.
You can follow the Github Api link and scroll upto the section name Creates a new repository for the authenticated user
, to add more parameters based on your need, Here i am just adding two parameter to check whether it is working or not
Parameter 1 (which is required) ---- name of your repository
Parameter 2 (for my own test) ---- making the repository private
then use this command
curl -u "Your_github_username" https://api.github.com/user/repos -d '{"name":"test123","private":"true"}'
Be sure to replace Your_github_username
with you actual github name and I have named my repository test123
. You can name it whatever you want.
I am making it private. You dont have to write private:TRUE
, if you want it to be public.
and then press Enter
. After that it will ask your github password write it and press enter.
A bunch of code will run in which you will find clone_url which is the link of your repository:

- 2,613
- 1
- 11
- 19
-
hi, what's `user` in ```https://api.github.com/user/repos ....```? it's git config `username`? – dev-assassin May 07 '20 at 10:26
-
i didn't get you what you are asking, can you describe a little bit more? – Fareed Khan May 07 '20 at 10:32
-
-
-
```$ curl -u "ASSASSIN-GROUP" https://api.github.com/user/repos -d '{"name": "angular9app"}' ``` then is this right? i'd like to put it with public. so i removed `private`. – dev-assassin May 07 '20 at 10:40
-
-
-
-
-
not asking for password in the next command, what error is coming? – Fareed Khan May 07 '20 at 10:46
-
when i press `ctrl+c`, the message comes ```Enter host password for user 'ASSASSIN-GROUP':``` but after run above command, there is no response. – dev-assassin May 07 '20 at 10:48
-
you dont have to presss ctrl+c, you have to write your github password after pressing enter to the curl command in the next line password is required, you have to write it it will not going to be visible for you when you are writing your password and then press enter buddy! – Fareed Khan May 07 '20 at 10:51
-
-
you can follow this video https://www.youtube.com/watch?v=6xmFp4_U9-A – Fareed Khan May 07 '20 at 10:57
-