[Bug 2015304] [NEW] git clone shows "Host key verification failed" on lunar lobster docker image

imker 2015304 at bugs.launchpad.net
Tue Apr 4 21:01:17 UTC 2023


Public bug reported:

I run a script in a lunar docker image that clones a git repository from
'git.launchpad.net'

While docker image build I install the git package. The script then runs the following command:
ssh-keyscan -t rsa git.launchpad.net >> $HOME/.ssh/known_hosts

This creates the following output:
# git.launchpad.net:22 SSH-2.0-Twisted_20.3.0+lp9

As exptected, and $HOME/.ssh/known_hosts contains the key, as expected. But then I run:
git clone ssh://imker@git.launchpad.net/samba-exporter

And get the following output:
Cloning into 'samba-exporter'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Error: Can not clone the launchpad repo ssh://imker@git.launchpad.net/samba-exporter

Until now this script has work within docker for any Ubuntu version
since Focal, so I assume there is something wrong the the git package in
lunar lobster.

The docker file I use to get the lunar image showing this error can be
found here: https://github.com/imker25/samba_exporter/blob/feat/lobster-
package/build/LaunchpadPublish/Dockerfile.lunar

** Affects: git (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to git in Ubuntu.
https://bugs.launchpad.net/bugs/2015304

Title:
  git clone shows "Host key verification failed" on lunar lobster docker
  image

Status in git package in Ubuntu:
  New

Bug description:
  I run a script in a lunar docker image that clones a git repository
  from 'git.launchpad.net'

  While docker image build I install the git package. The script then runs the following command:
  ssh-keyscan -t rsa git.launchpad.net >> $HOME/.ssh/known_hosts

  This creates the following output:
  # git.launchpad.net:22 SSH-2.0-Twisted_20.3.0+lp9

  As exptected, and $HOME/.ssh/known_hosts contains the key, as expected. But then I run:
  git clone ssh://imker@git.launchpad.net/samba-exporter

  And get the following output:
  Cloning into 'samba-exporter'...
  Host key verification failed.
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  Error: Can not clone the launchpad repo ssh://imker@git.launchpad.net/samba-exporter

  Until now this script has work within docker for any Ubuntu version
  since Focal, so I assume there is something wrong the the git package
  in lunar lobster.

  The docker file I use to get the lunar image showing this error can be
  found here:
  https://github.com/imker25/samba_exporter/blob/feat/lobster-
  package/build/LaunchpadPublish/Dockerfile.lunar

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/git/+bug/2015304/+subscriptions




More information about the foundations-bugs mailing list