Jenkins and github

I have a jenkins server with the github plugin to trigger every time a change is made to the repo.
I have the private key and the public key loaded into the github repo.
The job is configured as:
Repository URL

I didn’t enter the URL in the top part of the job.
One of the tasks I have Jenkins do is:
cd /var/www/html/ && git pull origin master
But whenever I make a change to the repo it is not being triggered and I don’t know why.

  • How to deploy through AWS codeploy using composer when a dependency is in a private repository
  • Can't git aws.push to elastic beanstalk with ruby repo
  • pushing to elastic beanstalk removes files created on servers
  • Can I use AWS code Deploy for pulling application code while autoscaling?
  • Exclude directories from elastic beanstalk deploy
  • eb awscli cant deploy from git directory
  • When I run the build manually I get:
    [Unit_Test] $ /bin/sh -xe /tmp/
    + cd /var/www/html/
    + git pull origin master
    ERROR: Repository not found.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.
    Build step ‘Execute shell’ marked build as failure
    Email was triggered for: Failure – Any
    Sending email for trigger: Failure – Any
    Sending email to:
    Finished: FAILURE

  • git:// protocol blocked by company, how can I get around that?
  • Git list of branch names of specific remote
  • Git alias parameter completion doesn't work in Zsh
  • How can I find the url after i use 'git clone' to clone a repository
  • Change gitolite logs default location
  • Summary of changes between two commits of branches in Git
  • 2 Solutions collect form web for “Jenkins and github”

    Don’t just use Jenkins as a shell script executor:

    • Use the Git plugin and configure it correctly. With this you should be able to pull code
    • Use the GitHub plugin and check the Build when a change is pushed to GitHub and add the hook to your repo on GitHub so Jenkins gets notified whenever a change is pushed
    • Under the point Pre Steps add Execute shell and prepare the environment for the actual build

    Had to add polling with * * * * * to get it to work.

    Git Baby is a git and github fan, let's start git clone.