My company has moved to a new GITHUB repository. On my Linux development server I am trying to connect to the new git repository in order to clone it. I have a deployment tool that gets the software from the GIT repository and deploy it automatically.
However, my new connection to the new repository does not work
$ git clone https://githubxxxxx.com/xxxxxxx/myrepo.git
Cloning into 'myrepo'...
fatal: unable to access 'https://githubxxxxx.com/xxxxxxx/myrepo.git/': Peer's certificate issuer has been marked as not trusted by the user.
I guess I have done everything that I suppose to:
- I created a new key for SSH
- I stored the key in the GIT repository
I did the same procedure for my laptop and there it worked.
If I change the global property of sslVerify
git config --global http.sslVerify false
Then I am able to connect and clone, but every time then I would have to put the user and password, which is non sense.
Does anyone know if I miss any step here ? Is there any other global variable that I have to set ?
If I do a ssh -v
to the repository, I see that I can authenticate.
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,rsa-sha2-512,rsa-sha2-256,ssh-dss>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/ftpfdm/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 535
debug1: Authentication succeeded (publickey).
Authenticated to githubxxxxx.com (via proxy).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: proc
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
PTY allocation request failed on channel 0
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Hi x329097! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Connection to githubxxxxx.com closed.
Update
If I try by ssh , I got connection close by remote host
$ git clone ssh://githubxxxxx.com:mygroup/myrepo.git
Cloning into 'myrepo'...
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
New Update
This works instead. Does anyone know why it works this way and not with ssh://
, when actually is a cloning by ssh. I was about to post the solution as answer, but I think it is not right, as I have no idea why this way works.
git clone git@githubxxxxx.com:group/myrepo.git