8

Can anyone spot what I could possibly be doing wrong? You can browser zoom in to see image details.

This is a fresh account, new project, owner of group and I am simply unable to push (HTTPS) following instructions provided.

Unable to push - repository not found

Daniel Sokolowski
  • 11,982
  • 4
  • 69
  • 55
  • Please use text instead of images, it is easier to read and search. – Ciro Santilli OurBigBook.com Nov 08 '14 at 21:27
  • Do the following work: SSH push, web edit, HTTPS to non-empty repo? Is your username `stg` and `stgps` is a group? Does push to your own repos work? – Ciro Santilli OurBigBook.com Nov 08 '14 at 21:32
  • Have you created a commit on the master branch? http://stackoverflow.com/questions/827351/push-origin-master-error-on-new-repository – Ciro Santilli OurBigBook.com Nov 08 '14 at 21:33
  • Yes @CiroSantilli, I have followed the push existing and create repository instructions; neither worked. – Daniel Sokolowski Nov 11 '14 at 15:34
  • I know it's been a *long* time since this was asked, but I'm having the same issue with a custom GitLab server I'm running behind a Nginx reverse proxy. None of the repositories I create can be pushed or pulled from over HTTPS, and it's driving me crazy! If you ever found a solution to this problem, I'd really appreciate it if you could share it with me. –  Feb 13 '17 at 00:51
  • 1
    @ChefCyanide sorry I have not found a solution. I believe my issue was due to software quality so I have abondened GitLab as a repo provider - but maybe things have changed now. – Daniel Sokolowski Feb 20 '17 at 19:01
  • @DanielSokolowski What a shame. I really love the GUI provided by GitLab, but aside from that, I can't seem to make my installation usable. I'm planning on reinstalling it, but from source, instead of using the installation script. I don't know if that will fix anything, but it's worth a shot. –  Feb 20 '17 at 19:31

5 Answers5

11

When adding the remote URL to the initial configuration, instead of using the URL that Gitlab gives you, try adding the following URL instead and replace the details below as mentioned, to reflect your info & your project info:

REMOTE URL FORMAT:

https://YOUR_USER_NAME:PASSWORD@gitlab.com/YOUR_USER_NAME/YOUR_PROJECT_NAME.git/

REPLACEMENTS IN THE ABOVE URL:

YOUR_USER_NAME - Replace this with your gitlab username
PASSWORD - Replace this with your gitlab password
YOUR_PROJECT_NAME - Replace this with your gitlab project name (whatever is generated for you)
Devner
  • 6,825
  • 11
  • 63
  • 104
  • 2
    I recommend not putting your GitLab password in plain-text on disk. It's vulnerable to being stolen that way. – NathanAldenSr Sep 04 '19 at 13:55
  • @NathanAldenSr I totally agree with you. But unfortunately, I could not find any other way to make it work without using the solution that I proposed. And as you know, being able to push changes to repo is one of the high priority items. If you do know of any other solution that achieves the objectives without having to hardcode the password, please share. – Devner Sep 04 '19 at 14:45
  • thanks man, really grateful – Muhammad Faizan Feb 21 '22 at 11:13
9

I create a small site to fix really quick this issue. gitlab fix remote

image of the web site

  • Thanks this works, by why? Is it because they changed the git credential manager on windows (to Git-Credential-Manager-Core) and it is that thing is doing something wrong? – Wayne Uroda Jan 10 '21 at 15:41
  • Ah - I know. It is because i have two gitlab accounts, one for work, one personal. GCM-core uses my work login for gitlab.com. There is a setting inside GCM-core `usehttppath` which, if I turned on, would mean that GCM-core will use the whole path to decide which credentials to use. But this is easier, thanks! – Wayne Uroda Jan 10 '21 at 15:44
4

While Adding Your URL make sure you add your username like this

https://username@gitlab.com/path_of_repository.git

and also .git at the end is not to be missed

0

try to /profile/keys and add new key of server in GitLab

In your GitLab got to: /help/ssh/README

SSH keys An SSH key allows you to establish a secure connection between your computer and GitLab.

Esteban
  • 25
  • 1
  • 6
0

In my case for HTTPS-URL, it was not working

So I tried using it with SSH

First open command prompt in administrator mode then enter the following command to generate SSH key:

ssh-keygen -t rsa -b 4096 -C “<my key name>”

Then go to the location where this key is saved 'In my case (C:\Users\your_username\.ssh)' and open id_rsa.pub and copy its content.

Then go to GitLab create a new SSH key and add this copied content to your SSH key.

After that try cloning using SSH-URL

Pranav Choudhary
  • 2,726
  • 3
  • 18
  • 38