0

I want to import a project in gitlab with ssh://

I have on the same network :

  • a gitlab installed on a raspebrry
  • a git server on a synology

My git server is only available via ssh://*****@mysynology:/the/repository/path/myproject.git

I tried with ssh key authentication without password but I don't know the user used by gitlab to do the git clone...

I have this message in gitlab:

Error importing repository ssh://*****@mysynology/the/repository/path/myproject.git into root/myproject - Cloning into bare repository '[REPOS PATH]/root/myproject.git'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
jeremy.romano
  • 141
  • 2
  • 8

1 Answers1

1

Try first to SSH to *****@mysynology, and make sure /the/repository/path/myproject.git is accessible.

Then clone on your local PC that repo, using the SSH URL.

Finally, push back to your GitLab.

I don't know the user used by gitlab to do the git clone...

No need: create a new empty GitLab repository (to receive your push).
And the GItLab page for that new repository will show you the SSH user you should include in your SSH URL (usually 'git')

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Ok thanks, but I want to keep my repo on my synology and do all my push/pull on my synology, is it possible ? – jeremy.romano May 14 '19 at 06:36
  • @jeremy.romano Yes, my answer was talking about your GitLab, the one on your synology. – VonC May 14 '19 at 06:37
  • Sorry but my gitlab is on a raspberry, only my git server is on my synology – jeremy.romano May 14 '19 at 06:44
  • @jeremy.romano OK then: your GitLab on raspberry: as long as you have a valid SSH key registered on it, you can configure your local SSH to use that key when pushing to your GitLab (with a .ssh/config file, as in https://stackoverflow.com/a/23751734/6309) – VonC May 14 '19 at 07:12