Repository navigation
Closed
Description
Bug Report
What did you do?
ran the following command:
~/go/bin/operator-sdk new jicowan-operator
The operator-sdk didn't recognize the --api-version or --kind flags
2018/10/26 16:34:07 go type operator does not use --api-version or --kind. Please see "operator-sdk add" command after running new.
What did you expect to see?
I expected for the operator SDK to create the project.
What did you see instead? Under which circumstances?
Run dep ensure done
Run git init ...
Initialized empty Git repository in /Users/jicowan/go/src/github.com/jicowan-operator/.git/
error: gpg failed to sign the data
fatal: failed to write commit object
2018/10/26 16:36:15 failed to exec git []string{"commit", "-q", "-m", "INITIAL COMMIT"}: exit status 128
Environment
- operator-sdk version:
operator-sdk version 0.0.7+git
Insert operator-sdk release or Git SHA here. If you have paste the Gopkg.lock operator-sdk information here.
golang version:
go version go1.11.1 darwin/amd6
kubectl version:
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.4", GitCommit:"5ca598b4ba5abb89bb773071ce452e33fb66339d", GitTreeState:"clean", BuildDate:"2018-06-06T08:13:03Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.3-eks", GitCommit:"58c199a59046dbf0a13a387d3491a39213be53df", GitTreeState:"clean", BuildDate:"2018-09-21T21:00:04Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
* Kubernetes version information:
-
Kubernetes cluster kind:
EKS -
Are you writing your operator in ansible or go?
I will write it in go if I can get it to work.
Possible Solution
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels
Activity
AlexNPavel commentedon Oct 26, 2018
It looks like the machine you are running this on does not have
gitconfigured correctly. Can you make commits on other git projects or do you get the same error? Part of thenewcommand initializes a git repo in the project, and that's the step that's failing according to the error you posted.AlexNPavel commentedon Oct 27, 2018
Try running the operator-sdk new command with the
--skip-git-initflag. That should fix the issuebvoss commentedon Oct 29, 2018
Same here with 0.0.7+git aka master.
"--skip-git-init" dose not solve the issue.
And https://github.com/operator-framework/operator-sdk/blob/master/commands/operator-sdk/cmd/new.go#L253 suggests it has nothing to do with git, rather than a hard check for type go
The tag 0.0.7 dose not have this check and works fine for me.
AlexNPavel commentedon Oct 29, 2018
@bvoss There were 2 different problems mentioned in the original post. The first was the
--api-versionand--kindchecks. Those were removed as part of the changes that will be coming with the large restructuring inv0.1.0. Most of the documentation has already been updated to reflect these changes.The
--skip-git-initflag fix fixes the second issue brought up in the issue, which was a git/gpg failure.bvoss commentedon Oct 29, 2018
@AlexNPavel Sorry my fault, I only saw the first issue and mixed them up.
But the getting started guide on master uses the 0.0.7 syntax of operator-sdk. May by you can add hint there to install the 0.0.7 version of the sdk. I think some interested newcomer will struggle with this.
AlexNPavel commentedon Oct 29, 2018
@bvoss I believe everything in this repo is up to date with the changes. But yes, the getting started repo is out of date. I'll open an issue on the getting started repo to update that as well.
jicowan commentedon Oct 30, 2018
@AlexNPavel I made few changes to my Git configuration awhile back because I had to sign my changes with a gpg key. I've been able to push changes to Git so I didn't think it was the cause of the issue I was having. I'll revisit my configuration. Thanks.
-J