Skip to content

Instantly share code, notes, and snippets.

@Tharwat96
Last active July 4, 2020 16:43
Show Gist options
  • Save Tharwat96/85faa9486c4e72aea74c2a8031666b06 to your computer and use it in GitHub Desktop.
Save Tharwat96/85faa9486c4e72aea74c2a8031666b06 to your computer and use it in GitHub Desktop.
Jenkins tips & tricks

In this file I will list stubborn errors encountered and their fix in order not to fall for them again and solve them fast

SSH Build keeps failing because of secret key authorization error.
  • Make sure to generate the keys using rsa encryption.
  • Make sure that both keys (pub and priv) are a pair.
  • Don't trust Jenkins connections check as it has some issues sometimes.
  • Try using different Jenkins version on your development env to make sure it is not a jenkins error.
// source:
// https://medium.com/faun/using-docker-in-jenkins-cba6b8070756
// create new jenkins container with access to the docker socket and data
# docker run -d --name jenkins -p 8080:8080 -p 50000:50000 \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /usr/bin/docker:/usr/bin/docker jenkins/jenkins:lts
// from inside the container give full access to all users to the docker socket
# docker exec -u root -it jenkins bash
# chmod 777 /var/run/docker.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment