I'm not sure if my understanding of English is correct or not as I've tried lots and lots for this and still won't do as I think it would.
I want to CREATE a new git-repo on my account from CLI without logging in on their website and create an empty 'project' (for me this 'project' is a new repo)
For ME a gitlab repo is the thing... object... wutever that ends with '.git'
I got one for my dotfiles and that is naturally called dotfiles.git
If I try the thing below to this "repo", the dotfiles.git it works, but for me that is not to CREATE A NEW repo, or am I waaay off?
XXX is my name on gitlab
The last thing I tried told me to:
Code:
git init
git add .
git commit -m "...."
git push --set-upstream git@gitlab.com/XXX/gitlab-project.git
but this gave me this error on that last command:
Code:
To push the current branch and set the remote as upstream, use
git push --set-upstream git@gitlab.com/XXX/gitlab-project.git master
To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.
so I tried the thing it told me to do, except the 'master' thing as they are gonna change that later so I go for main:
and this happens:
Code:
git push --set-upstream git@gitlab.com/XXX/gitlab-project.git main
error: src refspec main does not match any
error: failed to push some refs to 'git@gitlab.com/XXX/gitlab-project.git'
I also tried the 'master' and this was the result:
Code:
git push --set-upstream git@gitlab.com/XXX/gitlab-project.git master
fatal: 'git@gitlab.com/XXX/gitlab-project.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
So my question here is, can I or can I not create a NEW!!! (as for me, new) repo in gitlab from a CLI?
I got some SBC's I use and on those I got no GUI just a simple CLI but I do have network and if I do something in some code that I like I really want to backup that ASAP to, probably a NEW repo, not just add it to my dotfiles.git repo.
What is the problem?
ME or the world