keygen.sh 588 B

12345678910111213
  1. #!/bin/bash
  2. #git_url="ssh://git@git.sdsys.ru:8022/iru/openvpn-pki.git"
  3. #git_dir="openvpn-pki"
  4. JENKINS_MAIL="jenkins@sdsys.ru"
  5. GIT_SSH_COMMAND='ssh -i /tmp/keyfile -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' git clone ${git_url}
  6. cd ${git_dir}/gost
  7. ./build-key $1
  8. echo "Generate new key and cert for $1" > /tmp/commit.txt
  9. git add -A
  10. git config --global user.email "${JENKINS_MAIL}"
  11. git config --global user.name "Jenkins"
  12. git commit -F /tmp/commit.txt
  13. GIT_SSH_COMMAND='ssh -i /tmp/keyfile -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' git push origin master