2

I am trying to install a package from a private repository that I have access to using pip.

I am able to directly clone it.

But when I try to install it via pip, I am getting below error:

  ERROR: Command errored out with exit status 128:
  command: git clone -q 'ssh://****@github.com/my_projects/ib_client' /tmp/pip-req-
  build-ivumdv23
  cwd: None
  Complete output (7 lines):
  key_load_public: invalid format
  Warning: Permanently added the ECDSA host key for IP address 'AA.BB.CC.DD' to the list 
  of known hosts.
  Permission denied (publickey).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  ----------------------------------------
  ERROR: Command errored out with exit status 128: git clone -q 
  'ssh://****@github.com/my_projects/ib_client' /tmp/pip-req-build-ivumdv23 Check 
  the logs for full command output.
  The command '/bin/sh -c python3 -m pip install --upgrade pip     && python3 -m pip install -q -r ${BASE_DIR}/requirements.txt     && python3 -m pip install -q -r ${BASE_DIR}/healthchecks/requirements.txt' returned a non-zero code: 1
  make: *** [build] Error 1

Regarding same, I have gone through the posts: Trouble installing private github repository using pip , Is it possible to use pip to install a package from a private GitHub repository? and Trouble installing private github repository using pip, but still I am unable to figure out how to solve this.

sinoroc
  • 18,409
  • 2
  • 39
  • 70
Joy
  • 4,197
  • 14
  • 61
  • 131
  • 2
    Looks like you have a ssh problem (let's add the "ssh" tag). Not a Python/pip problem, nor a git problem. First figure out how to correctly configure your ssh client to reliably connect to the host of the git repository `ssh git@github.com`. – sinoroc Feb 22 '20 at 12:22
  • https://stackoverflow.com/search?q=%5Bssh%5D+key_load_public%3A+invalid+format – phd Feb 22 '20 at 13:12
  • @sinoroc Thanks for your response. I have added this IP and hostname in ~/.ssh/known_hosts and restarted ssh daemon. But still the problem persists. – Joy Feb 23 '20 at 02:56
  • @Joy you need to address the `key_load_public: invalid format` issue. I don't believe it has anything to do with `known_hosts` or even less so with your SSH daemon (you need to fix the configuration of your SSH client, not your SSH server). Check that your public-private key pair is correct. Are you usually able to connect to `ssh git@github.com`? Are you usually able to clone this private git repository? – sinoroc Feb 23 '20 at 10:28

0 Answers0