Ubuntu环境保持SVN密码
直接上脚本,执行完后重新登录一下终端
#!/bin/bash if ! command -v gpg-agent &> /dev/null; then echo "not use gpg-agent,exit ..." exit 1 fi num=`grep GPG_TTY ~/.bashrc -c` if [ "$num" -eq 0 ]; then echo "export GPG_TTY=\$(tty)" >> ~/.bashrc echo "export GPG_AGENT_INFO=\`gpgconf --list-dirs agent-socket | tr -d '\\\n' && echo -n ::\`" >> ~/.bashrc fi mkdir ~/.gnupg/ echo "max-cache-ttl 60480000" > ~/.gnupg/gpg-agent.conf echo "default-cache-ttl 60480000" >> ~/.gnupg/gpg-agent.conf . ~/.bashrc gpg-connect-agent updatestartuptty /bye rm -rf ~/.subversion echo "restar ssh will work"
浙公网安备 33010602011771号