The argument “-i” passed to GIT_SSH_COMMAND is being ignored

后端 未结 2 1538
我寻月下人不归
我寻月下人不归 2021-02-15 02:07

I want to use other IdentityFile for git. I want to use it dynamically, not via config. I\'m doing this:

  $ GIT_SSH_COMMAND=\'ssh -i /home/my_user/.ssh/id_ed255         


        
2条回答
  •  时光说笑
    2021-02-15 02:36

    Check you commands (is git called directly or through an alias) and configuration:
    As I mention in "Using GIT_SSH_COMMAND", a git config -l might reveal other configuration that would override the environment variable.

    Check the return of git config core.sshCommand.

    Finally, GIT_SSH_COMMAND means Git 2.10+, so if your version of Git is too old, you will need to update it first.

提交回复
热议问题