diff --git a/.gitignore b/.gitignore index 093d0f5..104403f 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,6 @@ _testmain.go *.prof # ghkeys-specific -config.yml +ghkeys.yml ghkeys result diff --git a/README.md b/README.md index d9a5e90..c906a60 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ $ go get github.com/conortm/ghkeys ## Configure -Create a `config.yml` file like [`config.example.yml`](./config.example.yml): +Create a `ghkeys.yml` file like [`ghkeys.example.yml`](./ghkeys.example.yml): ```yaml --- @@ -40,19 +40,19 @@ users: To print all keys: ```sh -$ ghkeys -config="/path/to/config.yml" +$ ghkeys -config="/path/to/ghkeys.yml" ``` Pass single username argument to print only that user's keys, for example, when using `AuthorizedKeysCommand`: ```sh -$ ghkeys -config="/path/to/config.yml" superadmin +$ ghkeys -config="/path/to/ghkeys.yml" superadmin ``` Use the `-write` flag to write keys to users' `authorized_keys` files: ```sh -$ ghkeys -config="/path/to/config.yml" -write +$ ghkeys -config="/path/to/ghkeys.yml" -write ``` ## TODO diff --git a/config.example.yml b/ghkeys.example.yml similarity index 100% rename from config.example.yml rename to ghkeys.example.yml diff --git a/main.go b/main.go index a6ef2ff..76b02d0 100644 --- a/main.go +++ b/main.go @@ -17,13 +17,13 @@ members of teams and either print them or write them to authorized_keys files. Pass a single 'username' argument to only print/write keys for that user. Usage: - ghkeys [-config="/path/to/config.yml"] [-write] [username] + ghkeys [-config="/path/to/ghkeys.yml"] [-write] [username] ` var ( // VERSION swapped out by `go build -ldflags "-X main.VERSION 1.2.3"` VERSION = "0.0.3" - configFilename = flag.String("config", "config.yml", "Path to yaml config file") + configFilename = flag.String("config", "ghkeys.yml", "Path to yaml config file") debug = flag.Bool("d", false, "Add debugging output") showVersion = flag.Bool("version", false, "Display the version number") writeToFile = flag.Bool("write", false, "Write keys to users' authorized_keys files") diff --git a/main_test.go b/main_test.go index a513e61..fc67ec8 100644 --- a/main_test.go +++ b/main_test.go @@ -14,7 +14,7 @@ import ( ) const ( - testdataConfigFilename = "testdata/config.test.yml" + testdataConfigFilename = "testdata/ghkeys.test.yml" testAuthorizedKeysFilename = "testdata/authorized_keys" ) diff --git a/testdata/config.test.yml b/testdata/ghkeys.test.yml similarity index 100% rename from testdata/config.test.yml rename to testdata/ghkeys.test.yml