git-client-plugin
git-client-plugin copied to clipboard
[JENKINS-70897] Add support for personal access token authentication
JENKINS-70897 - Add support for personal access token authentication
On Bitbucket Datacenter/Cloud and Azure it is required to use personal access tokens instead of username/password authentication.
Resolves jenkinsci/bitbucket-branch-source-plugin#716
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. This is simply a reminder of what we are going to look for before merging your code.
- [x] I have read the CONTRIBUTING doc
- [x] I have referenced the Jira issue related to my changes in one or more commit messages
- [ ] I have added tests that verify my changes
- [x] Unit tests pass locally with my changes
- [x] I have added documentation as necessary
- [x] No Javadoc warnings were introduced with my changes
- [x] No spotbugs warnings were introduced with my changes
- [x] I have interactively tested my changes
Types of changes
What types of changes does your code introduce? Put an x in the boxes that apply
- [ ] Infrastructure change (non-breaking change which updates dependencies or improves infrastructure)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
I've tested the changes by creating an organizational folder for project auto discovery. The token added in there as credentials discovers all projects/branches as expected, but the builds weren't able to checkout the repository. Tested it with a Windows build agent and Kubernetes cloud agents.
I'm also working on a PR in the git-plugin to pass the credentials in here. Otherwise this change will not work at all.
does this need a corrsponding change for
jgit, or is this unsupported there? if unsupported should this not be called somewhere?
I think that there is an alternate implementation technique that would add support for a standard credential and would work with both JGit and command line git.
Please kindly add these changes.
Hi, what is a status of this PR? Looks like it stuck. Is anything missing?
does this need a corrsponding change for
jgit, or is this unsupported there? if unsupported should this not be called somewhere?I think that there is an alternate implementation technique that would add support for a standard credential and would work with both JGit and command line git.
Did some investigation and JGit, also does not support the token authentication at all