| The way we hit this was by using the GitHub Organization object from /view/Main/newJob. GitHub Organization
- Credentials User Account for GitHub (username+password)
- Owner (the name of the GitHub Organization)
- Behaviors:
- – Repositories –
- Filter by name (with wildcards)
- Include: something – note: this wasn't relevant
- Exclude_blank_ – also not relevant
- – Within repository –
- Discover branches
- Strategy: Exclude branches that are also filed as PRs – note: this isn't relevant, and I think it's the default
- Discover pull requests from origin
- Strategy: Both the current pull request revision and the pull request merged with the current target branch revision – note: this isn't relevant
- Discover pull requests from forks
- Strategy: Both the current pull request revision and the pull request merged with the current target branch revision – note: this isn't relevant
- Trust: From users with Admin or Write permission – note: this isn't relevant, and I think it's the default
- – Additional –
- Check out to matching local branch – this shouldn't be relevant, but it's necessary for our tooling, since we're trying to automatically push tags in some cases.
Project Recognizers
- Pipeline Jenkinsfile
- Script Path: slightly non-standard – note: this isn't relevant
Scan Organization Triggers [x] Periodically if not otherwise run Interval: 1 day – note: this isn't relevant, and I think it's the default
Orphaned Item Strategy [x] Discard old items – note: this isn't relevant, and I think it's the default Days to keep old items: blank – note: this isn't relevant, and I think it's the default Max # of old items to keep: blank – note: this isn't relevant, and I think it's the default
Health metrics [Health metrics...] – note: this is a button which means nothing is set
Properties – note: there's nothing here at all.
JIRA JIRA sites [Add] – note: this is a button which means nothing is set
Pipeline Libraries Sharable libraries available to any Pipeline jobs inside this folder. These libraries will be untrusted, meaning their code runs in the Groovy sandbox. [Add] – note: this is a button which means nothing is set
Pipeline Model Definition ... this section has all empty / none defaults ...
Automatic branch project triggering Branch names to build automatically: .* – note this isn't relevant
That's the basic configuration. My goal is to push (see various notes about wanting to have things I can push). To do this, I click the Add button just above "Project Recognizers", and select Checkout Over SSH which adds an item into -- Additional -- and then I trigger a build. Once I do that, I get a very fast build failure.
Started by user ...
19:45:35 Connecting to https://api.github.com using .../****** (... account for GitHub)
Obtained ...Jenkinsfile from ...
Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
Cloning repository https://github.com/.../....git
...
Fetching upstream changes from https://github.com/.../....git
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --no-tags --progress https://github.com/.../....git +refs/heads/master:refs/remotes/origin/master" returned status code 128:
stdout:
stderr: remote: Invalid username or password.
|