Giter Site home page Giter Site logo

Comments (2)

ChrisChoke avatar ChrisChoke commented on July 18, 2024

is it possible that v3.0.3 has some issues?!
i downloaded the prebuilded binarys from the release, unzip it and tried to initialize the config directorys with certmgr genconfig
but this is not possible. in v1.6.5 it is possible.

root@sslca:/opt# ./certmgr-linux-amd64-v3.0.3 genconfig 
FATA[0000] Config File "certmgr" Not Found in "[/etc/certmgr]"

edit:

i have playing around and compare some things with version 1.6.5. in version 1.6.5 in root.go:

certmgr/cli/root.go

Lines 115 to 117 in e872f72

if err := viper.ReadInConfig(); err == nil {
log.Info("certmgr: loading from config file ", viper.ConfigFileUsed())
}

and on version 3.0.3 and master:

certmgr/certmgr/cmd/root.go

Lines 171 to 173 in 4af0d77

if err := viper.ReadInConfig(); err != nil {
log.Fatal(err)
}

if i change it to:

if err := viper.ReadInConfig(); err == nil { 
 	log.Fatal(err) 
 } 

the fatal error is gone and i can execute certmgr version, genconfig, help without having the configdir and configfile create before.

i can build binary with:

GOFLAGS=-mod=vendor go build -o /opt/certmgr -gcflags="-trimpath=/home/user/gopath" -ldflags="-X github.com/cloudflare/certmgr/certmgr/cmd.currentVersion=$(git describe --tags)" ./certmgr/

if i changed directory to repo's root dir.

so i am not sure if its right. my progamming knowledge isnt much great :-)
because of that i dont know if i should create a PR.

edit:

okay it is not so much easy :-) after creating configdir and configfile, no command can execute successful

root@sslca:/opt# ./certmgr help
FATA[0000] <nil>                                        
root@sslca:/opt# ./certmgr version
FATA[0000] <nil>                                        
root@sslca:/opt# ./certmgr check
FATA[0000] <nil>                                        
root@sslca:/opt# ./certmgr ensure
FATA[0000] <nil>                                        
root@sslca:/opt# ./certmgr
FATA[0000] <nil>

that is not the solution alone :-)

Chris

from certmgr.

ChrisChoke avatar ChrisChoke commented on July 18, 2024

can this a way to fix that issue?!

ChrisChoke@428234d

from certmgr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.