jx: Bad credentials with create quickstart

Summary

When creating a new quickstart project, Bad credentials error is popping up. That happened in a cluster set up with jx boot. It did manage to create the initial environment repos, so the issue is not in the token I passed to the process.

Steps to reproduce the behavior

git clone \
    https://github.com/jenkins-x/jenkins-x-boot-config.git \
    environment-jx-rocks-dev

cd environment-jx-rocks-dev

# Open requirements.yaml in an editor

# Set `cluster.clusterName`
# Set `cluster.environmentGitOwner`
# Set `cluster.project`
# Set `cluster.provider
# Set `cluster.zone`
# Set `secretStorage` to `vault`
# Set `storage.logs.enabled` to `true`
# Set `storage.reports.enabled` to `true`
# Set `storage.repository.enabled` to `true`

jx boot

cd ..

jx create quickstart \
    --filter golang-http \
    --project-name jx-canary

The output of the last command is as follows.

Using Git provider github.com at https://github.com
? Do you wish to use vfarcic as the Git user name? Yes
? Who should be the owner of the repository? vfarcic
X Sorry, your reply was invalid: GET https://api.github.com/repos/vfarcic/jx-canary: 401 Bad credentials []

It tried the same command with the additional --git-api-token argument and it fails with the same error.

Expected behavior

It works

Actual behavior

It doesn’t work

Jx version

The output of jx version is:

NAME               VERSION
jx                 2.0.1093
Kubernetes cluster v1.15.4-gke.22
kubectl            v1.17.0
helm client        Client: v2.14.3+g0e7f3b6
git                2.20.1 (Apple Git-117)
Operating System   Mac OS X 10.14.6 build 18G2022

Jenkins type

  • Serverless Jenkins X Pipelines (Tekton + Prow)
  • Classic Jenkins

Kubernetes cluster

GKE

Operating system / Environment

MacOS

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 30 (8 by maintainers)

Most upvoted comments

I had the same issue: I generated a new personal access token which made the old one fail. After I updated the /root/.jx/gitAuth.yml file, everything worked again.

In jx3, I resolved by update the credentials in ~/git/