Home > Mobile >  Cannot clone GIT repository using SSH
Cannot clone GIT repository using SSH

Time:07-15

In Windows:

When cloning GIT repository, I can do this successfully:

git clone https://[email protected]/clientes/sample/project.git

However, when I do:

git clone ssh://[email protected]:17177/clientes/sample/project.git

After the log in banner is displayed, this error is shown:

fatal: '/clientes/sample/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.

In MacOS:

When using HTTPS way, a SSL certificate expired error is shown.

When using SSH way, the same error as Window.

How can I solve those problems?

CodePudding user response:

the problem was that I was using my Git user. Git was installed using git user so I changed to git user and the repository error was gone

Any GitLab instance (on-premise or SaaS gitlab.com) never allows user SSH access.
It only allows one account, the 'git' service account.

The user authentication is then performed through the public SSH key used to establish that connection, since said public key is registered to your GitLab account.

CodePudding user response:

Either

  1. You need to sort out acces on the repository settings.

  2. Create license, terms and certificate file on the repository. By the looks of it it can't authenticate the certificates. It's quite easy git should just create one automatically when you create a repository. Or create one yourself.

  • Related