[root@host-10-0-228-47 ~]# jx install --provider=kubernetes --on-premise
? Select Jenkins installation type: Serverless Jenkins X Pipelines with Tekton
Setting the dev namespace to: jx
Using helmBinary helm with feature flag: template-mode
Context "kubernetes-admin@kubernetes" modified.
Enabling helm template mode in the TeamSettings
Git configured for user:******* and email *******@***.com
Using helm2
Skipping tiller
Using helmBinary helm with feature flag: template-mode
Initialising Helm 'init --client-only'
helm installed and configured
FATAL: initialise build packs failed: failed to reset hard to master in directory /root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes: git output: fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]': failed to run 'git reset --hard origin/master' command in directory '/root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes', output: 'fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]''
[root@host-10-0-228-47 ~]# jx version
NAME VERSION
jx 2.0.108
Kubernetes cluster v1.13.3
kubectl v1.13.3
helm client Client: v2.13.1+g618447c
git git version 1.8.3.1
Operating System CentOS Linux release 7.5.1804 (Core)
Are there any files under the path /root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes? Are you running this command as root? I am wondering whether there are file permission issue.
no any files.
yes,i used root.
[root@host-10-0-228-47 ~]# cd /root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes
[root@host-10-0-228-47 jenkins-x-kubernetes]# ls
[root@host-10-0-228-47 jenkins-x-kubernetes]#
no any files.
So for some reason something went wrong and hence the error.
yes,i used root.
Could be the reason for the problem. I'd try as non root. Or you could try setting _JX_HOME_ into a directory which is read/writable to non root.
I'd try as non root, but the test result are same.
Hmm, you could try to upgrade the CLI:
$ jx upgrade cli
and see whether it makes a difference.
You could also try running with some more trace enabled. Something like:
$ jx --verbose --log-level='debug' ...
Make sure to delete JX_HOME aka ~/.jx before you try to avoid any side effects with an existing directory.
[root@host-10-0-228-16 .jx]# jx --verbose --log-level='debug' install --provider=kubernetes --on-premise --external-ip 10.0.228.16
? Select Jenkins installation type: Serverless Jenkins X Pipelines with Tekton
Setting the dev namespace to: jx
Using helmBinary helm with feature flag: template-mode
Context "kubernetes-admin@kubernetes" modified.
Enabling helm template mode in the TeamSettings
Git configured for user: ******* and email ******@*****.com
Using helm2
Skipping tiller
Using helmBinary helm with feature flag: template-mode
Initialising Helm 'init --client-only'
helm installed and configured
FATAL: initialise build packs failed: failed to reset hard to master in directory /root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes: git output: fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]': failed to run 'git reset --hard origin/master' command in directory '/root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes', output: 'fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]''
[root@host-10-0-228-16 ~]# jx version
NAME VERSION
jx 2.0.123
Kubernetes cluster v1.13.3
kubectl v1.13.3
helm client Client: v2.13.1+g618447c
git git version 1.8.3.1
Operating System "CentOS Linux release 7.2.1511 (Core) "
Same issue:
[root@xxx ~]# jx version
NAME VERSION
jx 2.0.147
Kubernetes cluster v1.13.5
kubectl v1.14.2
helm client Client: v2.14.0+g05811b8
git git version 1.8.3.1
Operating System Red Hat Enterprise Linux Server release 7.5 (Maipo)
[root@xxx ~]# jx install --provider=kubernetes --external-ip x.x.x.x
? Select Jenkins installation type: Static Jenkins Server and Jenkinsfiles
Setting the dev namespace to: jx
Using helmBinary helm with feature flag: template-mode
? Missing required dependencies, deselect to avoid auto installing: helm
Installing helm
Downloading https://storage.googleapis.com/kubernetes-helm/helm-v2.14.0-linux-amd64.tar.gz to /root/.jx/bin/helm.tgz...
Downloaded /root/.jx/bin/helm.tgz
Installing helm secrets plugin
Initialising Helm 'init --client-only'
Context "test" modified.
Enabling helm template mode in the TeamSettings
Git configured for user: admin and email [email protected]
Using helm2
Skipping tiller
Using helmBinary helm with feature flag: template-mode
Initialising Helm 'init --client-only'
helm installed and configured
FATAL: initialise build packs failed: failed to reset hard to master in directory /root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes: git output: fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]': failed to run 'git reset --hard origin/master' command in directory '/root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes', output: 'fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]''
[root@xxx ~]# jx install --provider=kubernetes --on-premise --external-ip x.x.x.x
? Select Jenkins installation type: Static Jenkins Server and Jenkinsfiles
Setting the dev namespace to: jx
Using helmBinary helm with feature flag: template-mode
Context "test" modified.
Enabling helm template mode in the TeamSettings
Git configured for user: admin and email [email protected]
Using helm2
Skipping tiller
Using helmBinary helm with feature flag: template-mode
Initialising Helm 'init --client-only'
helm installed and configured
FATAL: initialise build packs failed: git output: From https://github.com/jenkins-x-buildpacks/jenkins-x-kubernetes
* [new branch] master -> origin/master
* [new branch] rawlingsj-patch-1 -> origin/rawlingsj-patch-1
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master: failed to run 'git pull' command in directory '/root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes', output: 'From https://github.com/jenkins-x-buildpacks/jenkins-x-kubernetes
* [new branch] master -> origin/master
* [new branch] rawlingsj-patch-1 -> origin/rawlingsj-patch-1
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master'
HI @garethjevans , as you preferred, I tried to use git re-pull the repo or directly delete ~/.jx but it didn't work either.
[root@xxx jenkins-x-kubernetes]# git remote -v
origin https://github.com/jenkins-x-buildpacks/jenkins-x-kubernetes.git (fetch)
origin https://github.com/jenkins-x-buildpacks/jenkins-x-kubernetes.git (push)
[root@xxx jenkins-x-kubernetes]# git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master
[root@xxx jenkins-x-kubernetes]# jx install --provider=kubernetes --external-ip 1.1.1.1
? Select Jenkins installation type: Static Jenkins Server and Jenkinsfiles
Setting the dev namespace to: jx
Using helmBinary helm with feature flag: template-mode
Context "test" modified.
Enabling helm template mode in the TeamSettings
Git configured for user: admin and email [email protected]
Using helm2
Skipping tiller
Using helmBinary helm with feature flag: template-mode
Initialising Helm 'init --client-only'
helm installed and configured
FATAL: initialise build packs failed: git output: There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master: failed to run 'git pull' command in directory '/root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes', output: 'There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master'
[root@xxx ~]# rm -rf .jx/
[root@xxx ~]# jx install --provider=kubernetes --external-ip 1.1.1.1
? Select Jenkins installation type: Static Jenkins Server and Jenkinsfiles
Setting the dev namespace to: jx
Using helmBinary helm with feature flag: template-mode
? Missing required dependencies, deselect to avoid auto installing: helm
Installing helm
Downloading https://storage.googleapis.com/kubernetes-helm/helm-v2.14.0-linux-amd64.tar.gz to /root/.jx/bin/helm.tgz...
Downloaded /root/.jx/bin/helm.tgz
Installing helm secrets plugin
Initialising Helm 'init --client-only'
Context "test" modified.
Enabling helm template mode in the TeamSettings
Git configured for user: admin and email [email protected]
Using helm2
Skipping tiller
Using helmBinary helm with feature flag: template-mode
Initialising Helm 'init --client-only'
helm installed and configured
FATAL: initialise build packs failed: failed to reset hard to master in directory /root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes: git output: fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]': failed to run 'git reset --hard origin/master' command in directory '/root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes', output: 'fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]''
/kind bug
/priority critical-urgent
/area git
Thanks for the feedback, I can see you are on the latest jx. It appears there is a bug in some of our clone logic, this doesn't appear to happen for everyone but we are looking at it now,
As a possible workaround, can you try:
cd ~/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes
git branch --set-upstream-to=origin/master master
Hi,
I am also getting same error when I try to install my on premises kubernetes. Below is the more detailed info.
[Surya@localhost jenkins-x-kubernetes]$ jx version
NAME VERSION
jx 2.0.150
Kubernetes cluster v1.14.1
kubectl v1.14.1
helm client Client: v2.14.0+g05811b8
git git version 1.8.3.1
Operating System CentOS Linux release 7.6.1810 (Core)
```
[Surya@localhost jenkins-x-kubernetes]$ jx install --provider=kubernetes --on-premise --no-default-environments
? Select Jenkins installation type: Serverless Jenkins X Pipelines with Tekton
Setting the dev namespace to: jx
Namespace jx created
Using helmBinary helm with feature flag: none
Context "[email protected]" modified.
Storing the kubernetes provider kubernetes in the TeamSettings
Enabling helm template mode in the TeamSettings
Git configured for user: Surya and email a.[email protected]
Using helm2
Skipping tiller
Using helmBinary helm with feature flag: template-mode
Initialising Helm 'init --client-only'
helm installed and configured
FATAL: initialise build packs failed: git output: There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master: failed to run 'git pull' command in directory '/home/Surya/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes', output: 'There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master'```
only to reference
FATAL: initialise build packs failed: git output: There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master: failed to run 'git pull' command in directory '/root/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes', output: 'There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master'
[root@VM_0_6_centos .jx]# cd ~/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes
[root@VM_0_6_centos jenkins-x-kubernetes]# ls
[root@VM_0_6_centos jenkins-x-kubernetes]# ll
total 0
[root@VM_0_6_centos jenkins-x-kubernetes]# git remote -v
origin https://github.com/jenkins-x-buildpacks/jenkins-x-kubernetes.git (fetch)
origin https://github.com/jenkins-x-buildpacks/jenkins-x-kubernetes.git (push)
[root@VM_0_6_centos jenkins-x-kubernetes]# git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to track)
[root@VM_0_6_centos jenkins-x-kubernetes]# git pull origin master
From https://github.com/jenkins-x-buildpacks/jenkins-x-kubernetes
* branch master -> FETCH_HEAD
[root@VM_0_6_centos jenkins-x-kubernetes]# git branch --set-upstream-to=origin/master master
error: the requested upstream branch 'origin/master' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
[root@VM_0_6_centos jenkins-x-kubernetes]# git fetch
From https://github.com/jenkins-x-buildpacks/jenkins-x-kubernetes
* [new branch] master -> origin/master
* [new branch] rawlingsj-patch-1 -> origin/rawlingsj-patch-1
[root@VM_0_6_centos jenkins-x-kubernetes]# git branch --set-upstream-to=origin/master master
Branch master set up to track remote branch master from origin.
[root@VM_0_6_centos jenkins-x-kubernetes]# git pull
Already up-to-date.
[root@VM_0_6_centos jenkins-x-kubernetes]# jx install
? Select Jenkins installation type: Serverless Jenkins X Pipelines with Tekton
Setting the dev namespace to: jx
Using helmBinary helm with feature flag: template-mode
Context "master" modified.
? Cloud Provider kubernetes
Enabling helm template mode in the TeamSettings
Git configured for user: malingxin and email [email protected]
Using helm2
Skipping tiller
Using helmBinary helm with feature flag: template-mode
Initialising Helm 'init --client-only'
helm installed and configured
? No existing ingress controller found in the kube-system namespace, shall we install one? [? for help] (Y/n)
Thanks for the feedback, I can see you are on the latest jx. It appears there is a bug in some of our clone logic, this doesn't appear to happen for everyone but we are looking at it now,
As a possible workaround, can you try:
cd ~/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes git branch --set-upstream-to=origin/master master
[root@host-10-0-228-16 jenkins-x-kubernetes]# git branch --set-upstream-to=origin/master master
fatal: branch 'master' does not exist
GC02XK0M9JG5ME:jenkins-x-classic 212739507$ git branch --set-upstream-to=origin/master master
fatal: Cannot setup tracking information; starting point 'origin/master' is not a branch.
```NAME VERSION
jx 2.0.186
git git version 2.21.0
Operating System Mac OS X 10.13.6 build 17G7024
I just ran into the same problem. I solved it by doing the following:
cd ~/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes
git fetch origin
git branch --set-upstream-to=origin/master master
error: installing the Jenkins X platform: failed to install/upgrade the jenkins-x platform chart: failed to clone reference: refs/heads/master: Get https://github.com/jenkins-x/jenkins-x-versions.git/info/refs?service=git-upload-pack: net/http: TLS handshake timeout
Thanks for the feedback, I can see you are on the latest jx. It appears there is a bug in some of our clone logic, this doesn't appear to happen for everyone but we are looking at it now,
As a possible workaround, can you try:cd ~/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes git branch --set-upstream-to=origin/master master[root@host-10-0-228-16 jenkins-x-kubernetes]# git branch --set-upstream-to=origin/master master fatal: branch 'master' does not exist
Same in here!
cd ~/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes
git pull origin master
git fetch origin master
git branch --set-upstream-to=origin/master master
fixes my problem
Thanks for the feedback, I can see you are on the latest jx. It appears there is a bug in some of our clone logic, this doesn't appear to happen for everyone but we are looking at it now,
As a possible workaround, can you try:cd ~/.jx/draft/packs/github.com/jenkins-x-buildpacks/jenkins-x-kubernetes git branch --set-upstream-to=origin/master master[root@host-10-0-228-16 jenkins-x-kubernetes]# git branch --set-upstream-to=origin/master master fatal: branch 'master' does not existSame in here!
same problem!
[root@localhost jenkins-x-kubernetes]# jx version
NAME VERSION
jx 2.0.842
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)
Most helpful comment
fixes my problem