LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-04-2022, 03:17 PM   #1
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Rep: Reputation: 22
Question HOW? - Create a new gitlab-repo in gitlab from CLI


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

Last edited by Basher52; 11-04-2022 at 03:24 PM. Reason: UPDATE on info
 
Old 11-04-2022, 03:23 PM   #2
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
Oh btw, I think I might say that I use SSH instead of https.

Last edited by Basher52; 11-04-2022 at 05:54 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trying to split a large SVN repo into one git repo. Ian John Locke II Linux - Software 1 01-30-2012 08:19 AM
Best way to automate copying of Git repo to subversion repo? jceipek Linux - Server 0 03-15-2011 02:42 AM
how to use syanptic in fc 5 and how to add repo and which repo to be added.. vikas04522 Fedora 1 08-26-2006 12:41 PM
how to use syanptic in fc 5 and how to add repo in it and which repo is to be added.. vikas04522 Linux - Software 1 08-26-2006 12:29 PM
adding mirror to yum.repo.d/<any-repo> ashwin_cse Fedora 1 03-10-2005 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration