常用于懒得配置令牌但是有现成公钥配置的时候

1
bash -c 'git remote | while read r; do url=$(git remote get-url "$r"); new_url=$(echo "$url" | sed "s#https://#git@#; s#/#:#"); git remote set-url "$r" "$new_url"; done'

或者运行 (有网络连接且懒得写命令的情况下)

1
bash -c 'source <(curl -L sh.pluv27.top/sshize-git.sh)'

搞定 :)