Answer the question
In order to leave comments, you need to log in
Is it possible to create a github repository via console?
for example, I do not want to go into the browser and create a public repository through my github account, can this be done through the terminal (console)?
Answer the question
In order to leave comments, you need to log in
git init
git remote add origin [email protected]:YOUR_USER/REPO.git
Since among the answers I did not find what I was looking for, this is what, as I understand it, the author of the question wanted to know:
Without using a browser, create a repository on Github using only the command line - remotely, so to speak.
In order for this to be possible this time and in the future, you still need to go to github and create an access token to the github API. This is done according to the following instruction https://docs.github.com/en/[email protected]/gi... The
token is used as a password for the curl command, the use of which for the purposes of creating a repository is described in the form of examples here https: //coderoad.ru/2423777/Is it possible-can-create-delete...
Below is a complete list of commands, from creating a folder with the project to uploading it to the newly created repository:
mkdir test
cd test
git init
echo "This repo was created remotely" >> README.md
git add .
git commit -m "first commit"
git remote add origin [email protected]:USER/test.git
curl -u 'USER:TOKEN' https://api.github.com/user/repos -d '{"name":"test"}'
git push -u origin master
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question