vagrant-gitcredentials 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
@@ -3,15 +3,15 @@ module VagrantPlugins
|
|
3
3
|
module Util
|
4
4
|
# generates new ssh key and calls github v3 api to add key to user account
|
5
5
|
def createKey
|
6
|
-
promptCredentials()
|
7
6
|
srcPath= "scripts/github.sh"
|
8
|
-
destPath = "
|
7
|
+
destPath = "/root/.ssh/github.sh"
|
9
8
|
# create script
|
10
9
|
@machine.communicate.upload(srcPath, destPath)
|
11
10
|
# set permissions for execution
|
12
|
-
@machine.communicate.execute("chmod 755
|
11
|
+
@machine.communicate.execute("chmod 755 /root/.ssh/github.sh")
|
13
12
|
# execute script w/ permissions
|
14
|
-
|
13
|
+
promptCredentials()
|
14
|
+
@machine.communicate.execute("sh /root/.ssh/github.sh #{gitUsername} #{gitPassword}")
|
15
15
|
|
16
16
|
@ui.info("created ssh key")
|
17
17
|
end
|