0

I have created a public key after I have pasted it on GitHub then I have tried to do git clone.

But while doing the clone, it is asking for the password:

error

Did i do anything wrong?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250

1 Answers1

0

First, make sure you have pasted your SSH public key in your User SSH setting page of your local GitHub instance, not github.com.

Second, test if you are correctly authenticated with:

ssh -Tv git@stg-...github-....local
            ^^^^^^^^^^^^^^^^^^^^^^^
            your local GitHub server name

You should see which key is used, and if yours is selected.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • i tried this but i am still getting the same error. debug1: Trying private key: /home/machkuri.rathan-a/.ssh/id_xmss debug1: Next authentication method: keyboard-interactive Password: debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive Password: – Vikas Rathan Feb 13 '23 at 06:51
  • @VikasRathan Getting the same error is expected. The goal was to check what key was served. In your case, a non-default key `id_xmss` is used, which means you must have a `~/.ssh/config` file which explicitly reference this key. DId you register `id_xmss.pub` in your GitHub Enterprise on-premise instance? (the `stg-...github-....local` one) – VonC Feb 13 '23 at 07:00
  • yes, we have the config file but there is no id_xmss key , how can we create it ? – Vikas Rathan Feb 13 '23 at 09:23
  • @VikasRathan `ssh-keygen -P "" -t rsa -f ~/.ssh/id_xmss`. Register the `id_xmss.pub` and try again. – VonC Feb 13 '23 at 09:27
  • debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive debug1: Next authentication method: gssapi-with-mic debug1: Unspecified GSS failure. Minor code may provide more information Server not found in Kerberos database. its still asking the password, i have created id_xmss key and pasted the pub one on github. – Vikas Rathan Feb 13 '23 at 09:42
  • @VikasRathan This time, you do have `/home/machkuri.rathan-a/.ssh/id_xmss`? And registerd the `id_xmss.pub`? Are you on Windows? – VonC Feb 13 '23 at 09:45
  • yes, i am on windows, i have the id_xmss.pub key and i have configured it on github. -rw-------. 1 machkuri.rathan-a domain users 2643 Feb 13 18:37 id_xmss -rw-r--r--. 1 machkuri.rathan-a domain users 601 Feb 13 18:37 id_xmss.pub . do i need to chnage any permission to the key ? – Vikas Rathan Feb 13 '23 at 09:51
  • @VikasRathan permissions look good. This is more a DNS issue when trying to access your GHE server `stg-...github-....local`, as [illustrated in this (unrelated) issue](https://github.com/spring-projects/spring-security-kerberos/issues/134#issuecomment-536213319). – VonC Feb 13 '23 at 09:56
  • Not sure i have raised the support ticket to Github also. – Vikas Rathan Feb 13 '23 at 10:01