when I did the follow command:
# jx install --provider=kubernetes
in the end ,the error shows like this:
error: creating the environments: failed to create staging environment in namespace jx: creating environment git repository: creatakercanyon-staging due to: POST http://gitlab.xxx.com/api/v3/user/repos: 410 []
when I do the follow command:
$ jx install --provider=kubernetes
and enter my gitlab address, successfully installed jenkins-x锛宐ut can not create git repository with gitlab.xxx.com


I used fowllow command installed gitlab with kubernetes:
helm upgrade --install gitlab gitlab/gitlab \
--timeout 600 \
--namespace gitlab-ce \
--set certmanager.install=false \
--set global.hosts.domain=xxx.com \
--set global.hosts.externalIP=192.168.15.141 \
--set global.ingress.configureCertmanager=false \
--set global.ingress.tls.enabled=false \
--set global.hosts.https=false \
--set global.edition=ce
jenkins-x can create repository with gitlab
jenkins-x can not create repository with gitlab
# jx --version
1.3.1010
The output of jx version is:
NAME VERSION
jx 1.3.1030
jenkins x platform 0.0.3636
Kubernetes cluster v1.13.4
kubectl v1.13.4
helm client v2.13.0+g79d0794
helm server v2.13.0+g79d0794
git git version 1.8.3.1
Operating System CentOS Linux release 7.6.1810 (Core)
COPY OUTPUT HERE
`error: creating the environments: failed to create staging environment in namespace jx: creating environment git repository: creating the repository: Failed to create repository /environment-takercanyon-staging due to: POST http://gitlab.xxx.com/api/v3/user/repos: 410 []``
Static Master Jenkins
kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4", GitCommit:"c27b913fddd1a6c480c229191a087698aa92f0b1", GitTreeState:"clean", BuildDate:"2019-02-28T13:37:52Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4", GitCommit:"c27b913fddd1a6c480c229191a087698aa92f0b1", GitTreeState:"clean", BuildDate:"2019-02-28T13:30:26Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
the kubernetes is the Binary installation on Bare Metal
cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
with xshell did the command.
Sorry For My Poor English.....
Also can not create spingproject....

Looks like it's using the old v3 API and not the v4 API.
In the jx go modules the dependency for the git lab library is:
github.com/xanzy/go-gitlab v0.0.0-20180814191223-f3bc634ab936
Upgrading that to a newer released version may well fix this issue.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle stale
Hi,
Same issue for me, when installing JX on a GitLab server.

I added the --no-default-environments option to bypass the issue, but potentially it will fail at some point as JX cannot create an environment on GitLab.
jx install --provider=kubernetes --external-ip 10.123.0.17 \
--ingress-service=$(yoursvcname) \
--ingress-deployment=$(yourdeployname) \
--ingress-namespace=kube-system
--no-default-environments
/area/gitlab
/priority/important-soon
/remove-lifecycle/stale
? Using Git user name: xxxx
DEBUG: About to create repository environment-shakerjuniper-staging on server http://gitlab.xxxx.com.cn with user xxxx
? Using organisation: packages
Creating repository packages/environment-shakerjuniper-staging
Creating Git repository packages/environment-shakerjuniper-staging
error: creating the environments: failed to create staging environment in namespace jx: creating environment git repository: creating the repository: POST http://gitlab.xxxx.com.cn/api/v4/projects: 400 {message: {limit_reached: []}, {namespace: [is not valid]}}
same problem
[root@localhost go-sample]# jx version
NAME VERSION
jx 2.0.842
jenkins x platform 2.0.1435
Kubernetes cluster v1.15.3
kubectl v1.16.0
helm client Client: v2.14.3+g0e7f3b6
git 1.8.3.1
Operating System CentOS Linux release 7.6.1810 (Core)
JX
| NAME | VERSION |
|---|---|
|jx | 2.0.894|
|jenkins x platform |2.0.1493|
|Kubernetes cluster |v1.14.6-eks-5047ed|
|kubectl | v1.16.2|
|helm client | Client: v2.14.3+g0e7f3b6|
|git | 2.14.5|
Command
jx install --provider=aws \
--cleanup-temp-files=true \
--default-admin-password="xxx" \
--default-admin-username="xxx" \
--default-environment-prefix="xxx" \
--domain="xxx.com" \
--git-provider-kind="gitlab" \
--git-provider-url="https://gitlab.xxx.com" \
--git-public=false \
--git-username="xxx" \
--git-api-token="xxx" \
--environment-git-owner="yyy" \
--helm-client-only \
--ingress-class=nginx \
--ingress-cluster-role="cluster-admin" \
--ingress-deployment="nginx-nginx-ingress-controller" \
--ingress-namespace=nginx \
--ingress-service="nginx-nginx-ingress-controller" \
--namespace=jx \
--no-tiller \
--skip-ingress \
--skip-setup-tiller \
--static-jenkins \
--tiller-cluster-role="cluster-admin" \
--tiller-namespace="kube-system" \
--timeout="6000" \
--verbose
Output
error: creating the environments: failed to create staging environment in namespace jx: creating environment git repository: creating the repository: GET https://gitlab.xxx.com/api/v4/namespaces: 401 {message: 401 Unauthorized}
our go-scm library is using gitlabs v4 API; we maybe need to move the gitlab code in jx to use go-scm instead https://github.com/jenkins-x/go-scm
Config:
$ jx version
NAME VERSION
jx 2.0.966
Kubernetes cluster v1.14.8
kubectl v1.16.2
helm client Client: v2.14.3+g0e7f3b6
git 2.17.1
Operating System Ubuntu 18.04.3 LTS
Further verification - 'jx boot' fails with the below:
DEBUG: getting repository user1/environment-mydev-dev: failed to get repository user1/environment-mydev-dev due to: GET http://<our_gitlab_host>/api/v3/repos/min03/environment-mydev-dev: 410 []
error: creating remote for dev environment environment-mydev-dev: duplicating https://github.com/jenkins-x/jenkins-x-boot-config to user1/environment-mydev-dev: getting repo for https://github.com/jenkins-x/jenkins-x-boot-config: failed to get repository jenkins-x/jenkins-x-boot-config due to: GET http://<our_gitlab_host>/api/v3/repos/jenkins-x/jenkins-x-boot-config: 410 []
error: failed to interpret pipeline file jenkins-x.yml: failed to run '/bin/sh -c jx step verify env' command in directory '.', output: ''
v3 API has been deprecated since GitLab 11, so this would seem to prevent installation using any vaguely maintained GitLab instance, including GitLab.com
Looks like it's using the old v3 API and not the v4 API.
In the jx go modules the dependency for the git lab library is:
github.com/xanzy/go-gitlab v0.0.0-20180814191223-f3bc634ab936Upgrading that to a newer released version may well fix this issue.
Looks like 0.6.0 is the first version that supports v4 of the API.
I'd happily submit a PR, but unfortunately I can't get jx to build locally to test it - the host for one of the modules required (vbom.ml/util) is serving an invalid certificate and so the company firewall is killing the download.
Hi @TonyNoble,
jx boot should work with GitLab. Use lighthouse instead of prow for the webhook value.
[bdameh@docker-manager000 dbi_jx_boot]$ jx version
NAME VERSION
jx 2.0.921
Kubernetes cluster v1.15.3
kubectl v1.15.3
helm client Client: v2.14.1+g5270352
git 2.16.5
Operating System CentOS Linux release 7.6.1810 (Core)
Below my jx-requirements.yaml
autoUpdate:
enabled: false
schedule: ""
bootConfigURL: https://github.com/jenkins-x/jenkins-x-boot-config
cluster:
azure: {}
clusterName: bdameh
environmentGitOwner: bdameh
gitKind: gitlab
gitName: gitlab
gitServer: https://gitlab-jx.nip.io
namespace: bdameh
project: bdameh
provider: kubernetes
zone: eu
environments:
- ingress:
domain: ""
externalDNS: false
namespaceSubDomain: ""
tls:
email: ""
enabled: false
production: false
key: dev
- ingress:
domain: ""
externalDNS: false
namespaceSubDomain: ""
tls:
email: ""
enabled: false
production: false
key: staging
- ingress:
domain: ""
externalDNS: false
namespaceSubDomain: ""
tls:
email: ""
enabled: false
production: false
key: production
ingress:
domain: nip.io
externalDNS: true
namespaceSubDomain: -jx.
tls:
email: [email protected]
enabled: true
production: true
secretStorage: local
storage:
backup:
enabled: false
url: ""
logs:
enabled: false
url: ""
reports:
enabled: false
url: ""
repository:
enabled: false
url: ""
vault: {}
velero: {}
versionStream:
ref: v1.0.164
url: https://github.com/jenkins-x/jenkins-x-versions.git
webhook: lighthouse
Hi @MehB
I've done that. However, as part of the initial setup process, jx boot is trying to query GitLab using version 3 of the API. V3 is deprecated as of GitLab 11, so any attempt to access the API results in a 410 'Gone' response, as shown above.
Looks like it's using the old v3 API and not the v4 API.
In the jx go modules the dependency for the git lab library is:
github.com/xanzy/go-gitlab v0.0.0-20180814191223-f3bc634ab936Upgrading that to a newer released version may well fix this issue.
Verified that jx boot or jx create quickstart works smoothly with Gitlab. I tested local compiled jx with github.com/xanzy/go-gitlab v0.22.1
@vishveshv01
That's good to know, though I'm still coming up against https://github.com/jenkins-x/jx/issues/6158 - curious to know how you avoided that?
jx 2.0.1039
Kubernetes cluster v1.14.8
kubectl v1.14.8
@TonyNoble jx boot -r jx-requirements.yml works fine with GitLab. Sample jx-requirements
cluster:
clusterName: jx-experiment
environmentGitOwner: <Repo_Owner>
gitKind: gitlab
gitName: gitlab
gitServer: **https**://Gitlab;TLDR
namespace: jx
provider: kubernetes
environments:
...
But As mentioned earlier jx boot would fail for Gitlab at verify env step. I compiled jx code with latest version of xanzy/go-gitlab library and continued with --start-step=verify-jenkins-x-environment.
Most helpful comment
our go-scm library is using gitlabs v4 API; we maybe need to move the gitlab code in
jxto use go-scm instead https://github.com/jenkins-x/go-scm