vagrant-gitcredentials 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,7 @@ module VagrantPlugins
8
8
  script.concat(["ssh-keygen -N '' -f ~/.ssh/github_rsa", "ssh-add ~/.ssh/github_rsa"])
9
9
  script.concat(["set -- $(<~/.ssh/github_rsa.pub)", 'JSON=\'{"title":"vagrant provision key", "key": "ssh-rsa \'$2\'"}\''])
10
10
  script.concat(['curl -u "$GITHUB_USERNAME:$GITHUB_PASSWORD" -d "$JSON" https://api.github.com/user/keys'])
11
+ @machine.communicate.execute("cat '' > ~/.ssh/github.sh")
11
12
  # create script
12
13
  script.each {
13
14
  |l|
@@ -19,7 +20,7 @@ module VagrantPlugins
19
20
  @machine.communicate.execute("cat ~/.ssh/github.sh")
20
21
  # execute script w/ permissions
21
22
  promptCredentials()
22
- @machine.communicate.execute("sh ~/.ssh/github.sh @#{gitUsername} @#{gitPassword}")
23
+ @machine.communicate.execute("sh ~/.ssh/github.sh '#@gitUsername' '#@gitPassword'")
23
24
 
24
25
  @ui.info("created ssh key")
25
26
  end
@@ -32,8 +33,8 @@ module VagrantPlugins
32
33
  # get (temporarily) git credentials from user
33
34
  def promptCredentials
34
35
  @ui.info("We will now generate an ssh key and add it to your github account.")
35
- @gitUsername = @ui.ask("What is your github account name? ")
36
- @gitPassword = @ui.ask("What is your github account password? (not stored) ")
36
+ @gitUsername = Shellwords.escape(@ui.ask("What is your github account name? "))
37
+ @gitPassword = Shellwords.escape(@ui.ask("What is your github account password? (not stored) "))
37
38
  end
38
39
  end
39
40
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module GitCredentials
3
- VERSION = "0.0.17"
3
+ VERSION = "0.0.18"
4
4
  end
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 17
9
- version: 0.0.17
8
+ - 18
9
+ version: 0.0.18
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jeremy Giberson