Git: GIT_SSH GIT_SSH_COMMAND

 

Fix permission

stat -L --format %a ~/.ssh/config

stat -L --format %A ~/.ssh/config

chmod -vR 600 ~/.ssh/config

 

ssh-agent

IdentitiesOnly no in ssh_config

ssh-add -v -t 3600 ~/.ssh/infringe

 

GIT_SSH

echo 'ssh -i ~/.ssh/infringe -F /dev/null -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$@"' > git_ssh

chmod -vR +x git_ssh

GIT_TRACE=1 GIT_SSH='./git_ssh' git push repo

 

GIT_SSH_COMMAND

GIT_SSH_COMMAND='ssh -i ~/.ssh/infringe -F /dev/null -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' git push repo

 

git config (core.sshCommand)

git config --local core.sshCommand 'ssh -i ~/.ssh/infringe -F /dev/null -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'

 

-c 

git -c 'core.sshCommand=ssh -i ~/.ssh/infringe -F /dev/null -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' push repo

 

posted @   ascertain  阅读(241)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2022-03-24 CSS: 层叠 继承 优先级
2021-03-24 ext4文件系统
点击右上角即可分享
微信分享提示