Skip to content

Commit

Permalink
Change config.yml to ghkeys.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
conortm committed May 31, 2015
1 parent 1eab62d commit eb07a54
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ _testmain.go
*.prof

# ghkeys-specific
config.yml
ghkeys.yml
ghkeys
result
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down Expand Up @@ -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
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

const (
testdataConfigFilename = "testdata/config.test.yml"
testdataConfigFilename = "testdata/ghkeys.test.yml"
testAuthorizedKeysFilename = "testdata/authorized_keys"
)

Expand Down
File renamed without changes.

0 comments on commit eb07a54

Please sign in to comment.