I want to add a new project on Gitlab only using the command line (bash). Is there a way or do I have to go to the Gitlab page and add the project via GUI?
I explicitely don't mean to add a local repository to a remote - I know how to do this. I merely look for a way to do the project creation step as well from the terminal without heading over to the Gitlab page.
Short answer no, because you are using Git SCM, which is not specially designed for GitHub, Gitlab, Bitbucket or even local repo. Git SCM is designed to integrate with every Git version control repository.
But you can write a custom command on Git SCM or shell script to integrate with GitLab or GitHub API to create new repo easily.
Open .gitconfig
file and then add following command:
[alias]
create-repo = !sh -c "curl -i -H 'Authorization: token YOUR_GITHUB_TOKEN' -X POST ....
And then run git create-repo name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With