-
Bug
-
Resolution: Fixed
-
Minor
-
None
This is similar to, but distinct from https://issues.jenkins.io/browse/JENKINS-60612
Specifically, for github enterpise accounts (hosted by github) the username is not `git` but rather something like `org-3722283` – as such the list of regex defined no longer match as they assume a username of `git@`.
https://github.com/jenkinsci/github-plugin/commit/961b1e391bc8dfbb1670e285dce8413d8c3c9288
This can be verified by watching the logs, which will now show the message
```
Could not match URL org-3722283@github.com:/organizationName/repoName.git
```
One workaround I can suggest in the meantime, is to set up the SCM with a Repository URL that omits the username entirely, and rely on the username from the credentials:
The RepositoryURL in the SCM configuration for the above can be set as
```
ssh://github.com/organizationName/repoName.git
```
Setting the credential as an ssh key with username `org-3722283` will correctly work for fetching, and it will allow the regex that omits the username to match. Took me a bit to find a regex that matches though, so this is meant to save someone else some time