jenkins-x/jx

Quickstart error: "failed to add and accept collaborator: failed to list invites: Not Supported"

babadofar opened this issue · 5 comments

On a fresh install of Jenkins X on minikube, windows, github trying to create a quickstart, the process ends with this error

error: failed to add and accept collaborator: failed to list invites: Not Supported

The Issue was originally mentioned at #7629 but it seems unrelated

This is a bit weird.
Github is the only provider which supports invitations:
https://github.com/jenkins-x/go-scm/blob/648bf6dd5dd722041d215869a547045f20984d29/scm/driver/github/user.go#L46

All the others except bitbucket server, will retun not supported, which is the error you are seeing: https://github.com/jenkins-x/go-scm/blob/648bf6dd5dd722041d215869a547045f20984d29/scm/driver/gitlab/user.go#L79

bitbucket server even if it does not support, always returns 200!

Worth checking if the git provider is not set properly in jx-requirements. Can you try running jx project import in debug mode (JX_LOG_LEVEL=debug jx project import ....), and check the output? Also worth checking the ~/git/credentials (or ~/.git-credentials) file and seeing if something is weird there? Also was the repo to be imported, cloned using ssh or https? ssh cloning is not supported yet ...

Last thing to try is to ignore the invite option completely when doing an import:
jx project import --no-collaborator

using "jx project quickstart"
This is jx-requirements


apiVersion: core.jenkins-x.io/v4beta1
kind: Requirements
spec:
  autoUpdate:
    enabled: false
    schedule: ""
  cluster:
    chartRepository: http://bucketrepo.jx.svc.cluster.local/bucketrepo/charts/
    clusterName: kind
    devEnvApprovers:
    - todo
    environmentGitOwner: todo
    gitKind: github
    gitName: github
    gitServer: https://github.com
    provider: minikube
    registry: 10.105.254.29
  environments:
  - key: dev
    owner: theowner
    repository: jx3-minikube
  - key: staging
  - key: production
  ingress:
    domain: 192.168.49.2.nip.io
    kind: ingress
    namespaceSubDomain: -jx.
    tls:
      email: ""
      enabled: false
      production: false
  pipelineUser:
    username: mygituser
  repository: bucketrepo
  secretStorage: local
  vault: {}
  webhook: lighthouse  

owner is redacted, but pipelineUser.username is actually mygituser

Since nobody else have reported they have the problem I close this now