Skip to content

Remote URL cannot be accessed for git < 2.7 if SSH isn't working #694

Closed
@rgerkin

Description

@rgerkin

If the system git is < 2.7, and the URL is one that git expects to use SSH access on, but SSH isn't working for any reason, then self.repo.git.remote("show", self.name) here in remote.py will fail with:

GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git remote show origin
  stderr: 'Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.'

or related errors if SSH is not installed or on the path.

This can be fixed by falling back to git config --get remote.%s.url' % self.name which just reads the URL directly from the configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions