Skip to content

Can't clone from HTTP repo requiring authentication #573

Closed
@foca

Description

@foca

Not entirely sure if I'm doing something wrong, but I'm running into a wall and I can't figure it out:

>>> pygit2.clone_repository('https://github.com/org/repo.git', '/tmp/foo', credentials=pygit2.UserPass('username', 'accessToken'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/pygit2/__init__.py", line 293, in clone_repository
    check_error(err)
  File "/usr/local/lib/python2.7/dist-packages/pygit2/errors.py", line 64, in check_error
    raise GitError(message)
_pygit2.GitError: Failed to resolve address for https: Name or service not known

This Failed to resolve address for https: Name or service not known happens whenever I try to clone or fetch from a repository requiring authentication.

This is the what I'm doing to install pygit2 (under Ubuntu 14.04):

sudo apt-get install -y build-essential cmake libssh2-1-dev
sudo apt-get install -y python-dev
sudo apt-get install -y python-pip python-cffi
(
  cd /tmp
  wget https://github.com/libgit2/libgit2/archive/v0.23.2.tar.gz
  tar -zxf v0.23.2.tar.gz
  cd ./libgit2-0.23.2
  cmake .
  make
  sudo make install
)
sudo ldconfig
sudo pip install pygit2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions