-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git Authentication fails on GHE #6579
Comments
EDIT: Ignore, I wasn't awake enough yet. =) |
What is the exact command line you're using with |
So the problem is that Also we should be setting |
`opts.AddGitRepoOptionsArguments` defaults `--git-provider-url` to `https://github.com`, no matter what the actual default should be for the cluster. This makes sense for some of the cases where it's used (i.e., `jx install`, `jx create cluster`, `jx create terraform`, etc), but not for others (`jx import` (and therefore `jx create quickstart`), `jx edit env`, and `jx create env`). In those cases, we should default it to the `gitServer` in the team settings. Except we don't actually set that with `jx boot`! It just stays on `https://github.com`. So we also need to set that from the requirements. fixes jenkins-x#6579 Signed-off-by: Andrew Bayer <[email protected]>
`opts.AddGitRepoOptionsArguments` defaults `--git-provider-url` to `https://github.com`, no matter what the actual default should be for the cluster. This makes sense for some of the cases where it's used (i.e., `jx install`, `jx create cluster`, `jx create terraform`, etc), but not for others (`jx import` (and therefore `jx create quickstart`), `jx edit env`, and `jx create env`). In those cases, we should default it to the `gitServer` in the team settings. Except we don't actually set that with `jx boot`! It just stays on `https://github.com`. So we also need to set that from the requirements. fixes jenkins-x#6579 Signed-off-by: Andrew Bayer <[email protected]>
`opts.AddGitRepoOptionsArguments` defaults `--git-provider-url` to `https://github.com`, no matter what the actual default should be for the cluster. This makes sense for some of the cases where it's used (i.e., `jx install`, `jx create cluster`, `jx create terraform`, etc), but not for others (`jx import` (and therefore `jx create quickstart`), `jx edit env`, and `jx create env`). In those cases, we should default it to the `gitServer` in the team settings. Except we don't actually set that with `jx boot`! It just stays on `https://github.com`. So we also need to set that from the requirements. fixes #6579 Signed-off-by: Andrew Bayer <[email protected]>
`opts.AddGitRepoOptionsArguments` defaults `--git-provider-url` to `https://github.com`, no matter what the actual default should be for the cluster. This makes sense for some of the cases where it's used (i.e., `jx install`, `jx create cluster`, `jx create terraform`, etc), but not for others (`jx import` (and therefore `jx create quickstart`), `jx edit env`, and `jx create env`). In those cases, we should default it to the `gitServer` in the team settings. Except we don't actually set that with `jx boot`! It just stays on `https://github.com`. So we also need to set that from the requirements. fixes jenkins-x#6579 Signed-off-by: Andrew Bayer <[email protected]>
Summary
I installed Jenkins X with the latest
jx
binary and jx-boot-configand afterwards
jx import
was failing due to bad credentials,here is what I found out.
After nuking everything to replicate the error I tried to delete a repository before
even running
jx import
withjx delete repo
, there I was asked if I want to use the git bot-user for that, which I previously defined injx boot
, or some other user.Here is the first issue, now that I chose a different user, without even being prompted to enter OAuth token, some other OAuth token is apparently used by default, as I receive this error:
The issue really kicks in when running
jx import
though, here Ican
enter the real OAuth token, though it is still not used?Therefore I receive this error:
I tried to curl the same url with my OAuth token to verify that it's not my token's fault and in fact, the curl was working, which means that the wrong token is being used for authentication.
Steps to reproduce the behavior
Run
jx boot
with the latest CLI, afterwards try importing a repository which is created outside of the org, preferably your normal user account.Alternativly, run
jx delete repo
and choose a different user than the default.Jx version
The output of
jx version
is:Jenkins type
Operating system / Environment
Mac OS X 10.15.2 build 19C57
The text was updated successfully, but these errors were encountered: