jx: git output: fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.

[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)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 6
  • Comments: 21 (3 by maintainers)

Most upvoted comments

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

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

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!

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)