Issue Type: Bug Bug
Assignee: Unassigned
Components: github-plugin
Created: 18/Mar/15 8:39 AM
Description:

Hello.

I've properly configured the Github plugin in Jenkins to communicate with my Github Enterprise instance. In GHE I've installed the "Jenkins (github plugin)" service so that every push event sends a hook to the proper Jenkins URL. The hook is sent and is received by jenkins as I can see from the logs (I've replaced sensitive content):

```
...
Received POST for https://github.example.com/foo/bar
...
Mar 17, 2015 6:47:51 PM FINE com.cloudbees.jenkins.GitHubWebHook
Considering to poke bar
Mar 17, 2015 6:47:51 PM FINE com.cloudbees.jenkins.GitHubWebHook
Skipped bar because it doesn't have a matching repository.
```

It just that the plugin does not match the name, and I can see why this happens.
In our Jenkins server, the .gitconfig contains this line:

```
[url "foo@<our-github-proxy>.com:"]
insteadOf = deploy:
```

This is a requirement since in our infrastructure we use a github proxy to implement ACLs (but that's irrelevant). So to clone a project Jenkins does a `git clone deploy:foo/bar.git`. Also in the github plugin settings I've configured it to be so.

But the github url to the repo is this: https://github.example.com/foo/bar. So it's different from the setting in the github plugin. I suspect that the plugin parses also the git url (not just the "foo/bar.git" part), therefore it can't correlate the repos, which actually is the same underlying repo (despite the url being different): https://github.com/jenkinsci/github-plugin/blob/master/src/main/java/com/cloudbees/jenkins/GitHubRepositoryName.java#L26

I believe that the plugin should have an (advanced) setting for such cases.

Environment: Jenkins 1.596.1, github-plugin 1.11, debian (wheezy), java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~deb7u1)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode), installed jenkins from the debian package and it's behind an nginx
Project: Jenkins
Priority: Major Major
Reporter: mandingueiro a
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to