New To Gitlab CE on Docker

Hello Everyone,

I have created a Gitlab CE Docker container everything appears to be working fine I can login to it via the URL and such but when I try to create a project and commit the first project I am gitting errors. From what I can tell I should use the following:
Just an fyi the ports are 8443,8081,8022 mapped to 443,80, and 22

git clone git@ohgl01.cfs.loc:cfadmin/test01.git ← I know 8081 goes here somewhere just not sure where…
Cloning into ‘test01’…
ssh: Could not resolve hostname ohgl01.cfs.loc: Name or service not known (THIS HOST NAME DOES EXIST IN MY DNS)
fatal: Could not read from remote repository.

Please make sure you have the correct access rights

Here is what I get when I try to login from git/cli:
mcooper@ohLentLT:~/projects/test01$ git clone git@ohgl01.cfs.loc:8081:cfadmin/test01.git
Cloning into ‘test01’…
git@ohgl01.cfs.loc’s password:
Permission denied, please try again.
git@ohgl01.cfs.loc’s password:
I noticed git@ should it be cfadmin@ ?
It won’t take my password

I am confused and frustrated,

Thanks guys,

From that message it is clear that the DNS is not working properly. Make sure you can resolve that domain on the computer.

There are two methods of communicating with Git repositories and each method is using different format to separate them. You can see them when you got to your project and click on the blue Clone button.

syntax is: git@ohgl01.cfs.loc:path/to/project/project.git

You have to setup SSH keys to use SSH method. Passwords don’t work with SSH. GitLab warns you about this if you don’t close the notification.

To use custom port you need to either prepare ~/.ssh/config file like this:

Host ohgl01.cfs.loc
  Port 8022

or use ssh:// syntax: ssh://git@ohgl01.cfs.loc:8022/path/to/project/project.git

syntax is: https://ohgl01.cfs.loc:8443/path/to/project/project.git

You use your username and password here.

1 Like

Thank you sir I appreciate it.