summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2016-02-25 21:31:40 +0200
committerytti <saku@ytti.fi>2016-02-25 21:31:40 +0200
commita06a636737825c2901f286454300d06065f66951 (patch)
tree7bd7c58301b7b34878151ad1b84f339f3b0a44ba
parent94f3a8e9a56763939b95fdf92b7e948f4fcbaa64 (diff)
parentdca17552bea521fce9ce500b91595e77f4e66e5f (diff)
Merge pull request #347 from awlx/ssh_key_support
Changed configuration item names
-rw-r--r--README.md4
-rw-r--r--lib/oxidized/hook/githubrepo.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 6b7ec87..9e9e38b 100644
--- a/README.md
+++ b/README.md
@@ -595,8 +595,8 @@ This hook configures the repository `remote` and _push_ the code when the specif
* `remote_repo`: the remote repository to be pushed to.
* `username`: username for repository auth.
* `password`: password for repository auth.
- * `pubkey`: publickey for repository auth.
- * `privkey`: privatekey for repository auth.
+ * `publickey`: publickey for repository auth.
+ * `privatekey`: privatekey for repository auth.
When using groups repositories, each group must have its own `remote` in the `remote_repo` config.
diff --git a/lib/oxidized/hook/githubrepo.rb b/lib/oxidized/hook/githubrepo.rb
index a6c6807..d33e54e 100644
--- a/lib/oxidized/hook/githubrepo.rb
+++ b/lib/oxidized/hook/githubrepo.rb
@@ -49,9 +49,9 @@ class GithubRepo < Oxidized::Hook
log "Using https auth", :debug
Rugged::Credentials::UserPassword.new(username: cfg.username, password: cfg.password)
else
- if cfg.has_key?('pubkey') && cfg.has_key?('privkey')
+ if cfg.has_key?('publickey') && cfg.has_key?('privatekey')
log "Using ssh auth with key", :debug
- Rugged::Credentials::SshKey.new(username: 'git', publickey: File.expand_path(cfg.pubkey), privatekey: File.expand_path(cfg.privkey))
+ Rugged::Credentials::SshKey.new(username: 'git', publickey: File.expand_path(cfg.publickey), privatekey: File.expand_path(cfg.privatekey))
else
log "Using ssh auth with agentforwarding", :debug
Rugged::Credentials::SshKeyFromAgent.new(username: 'git')