Skip to content

GitGetter.setupGitEnv() breaks sshCommand config attribute #299

@nl-brett-stime

Description

@nl-brett-stime

Context:
Recent versions of git (>= v2.10) support setting an SSH command via .gitconfig files. E.g., https://stackoverflow.com/a/38474137/93345 .

This is particularly useful when coupled with another somewhat recent feature of conditional config imports e.g., https://stackoverflow.com/a/36296990/93345 .

Problem:
The setupGitEnv() function in get_git.go specifies a GIT_SSH_COMMAND environment variable, even when an ssh key file is not explicitly set in the git repo URL via the sshkey query parameter.

When there is no query parameter for sshkey, the GIT_SSH_COMMAND environment variable should be left unset. Presently, it ends up being set to GIT_SSH_COMMAND=ssh, which breaks configuration via .gitconfig files.

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