Is it possible to create a new Git repository without creating it first on http://gitlab.com? My intention is to init a local repository, do some work, add files to the index, commit and finally push it to the server without creating the new repository manually on gitlab.
Repository creation failed with an error message: GitLab: The project you were looking for could not be found. fatal: Could not read from remote repository.
when I finally do
git push origin --all
Trying to answer the same question for myself (create a new gitlab repo from commandline and then push to it), I found this article Push to create a new project in GitLab's help pages. It worked for me running this command:
git push --set-upstream https://gitlab.example.com/myusername/nonexistent-project.git master
and then added the remote to the repo as prompted:
git remote add origin https://gitlab.example.com/myusername/nonexistent-project.git
(working for GitLab 10.5 and on)
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