rake_git_crypt 0.3.0.pre.2 → 0.3.0.pre.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +62 -54
- data/README.md +38 -0
- data/lib/rake_git_crypt/task_sets/standard.rb +25 -0
- data/lib/rake_git_crypt/tasks/unlock_with_encrypted_gpg_key.rb +120 -0
- data/lib/rake_git_crypt/tasks.rb +1 -0
- data/lib/rake_git_crypt/version.rb +1 -1
- data/rake_git_crypt.gemspec +1 -0
- metadata +20 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b944dc5a6b13423f03b1e36fbbfd013e4e1dd007f6b27f2abaa05fb8abf41782
|
|
4
|
+
data.tar.gz: 7a69c01c2fcd3a41ff3a4036dba1611c6a1773e4a511c05c2734fcaf4004137c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 864b5a7cf30588d848b56587e22e950ffd6e38a6dd67de4692012ca7fcddbb0b73732f9dbb9488bdafb27f92a1d66ffaf7db5dc2a2b2ea18d0c512d4228a7768
|
|
7
|
+
data.tar.gz: 42e0b804fe2d7e979f74ecd4965deaa6ad7c8fd38a5f584e5a3b420241c9c95cd7183d439142e5243c431848671f81ec6dde5890104ba446f6662b8c5e5426d0
|
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rake_git_crypt (0.3.0.pre.
|
|
4
|
+
rake_git_crypt (0.3.0.pre.3)
|
|
5
5
|
colored2 (~> 3.1)
|
|
6
|
+
lino (~> 4.1)
|
|
6
7
|
rake_factory (~> 0.33)
|
|
7
8
|
ruby_git_crypt (~> 0.1)
|
|
8
9
|
ruby_gpg2 (~> 0.12)
|
|
@@ -10,53 +11,56 @@ PATH
|
|
|
10
11
|
GEM
|
|
11
12
|
remote: https://rubygems.org/
|
|
12
13
|
specs:
|
|
13
|
-
activesupport (7.
|
|
14
|
+
activesupport (7.2.2.1)
|
|
14
15
|
base64
|
|
16
|
+
benchmark (>= 0.3)
|
|
15
17
|
bigdecimal
|
|
16
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
18
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
17
19
|
connection_pool (>= 2.2.5)
|
|
18
20
|
drb
|
|
19
21
|
i18n (>= 1.6, < 2)
|
|
22
|
+
logger (>= 1.4.2)
|
|
20
23
|
minitest (>= 5.1)
|
|
21
|
-
|
|
22
|
-
tzinfo (~> 2.0)
|
|
24
|
+
securerandom (>= 0.3)
|
|
25
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
23
26
|
addressable (2.8.7)
|
|
24
27
|
public_suffix (>= 2.0.2, < 7.0)
|
|
25
|
-
ast (2.4.
|
|
28
|
+
ast (2.4.3)
|
|
26
29
|
base64 (0.2.0)
|
|
30
|
+
benchmark (0.4.0)
|
|
27
31
|
bigdecimal (3.1.8)
|
|
28
32
|
childprocess (5.0.0)
|
|
29
33
|
colored2 (3.1.2)
|
|
30
|
-
concurrent-ruby (1.3.
|
|
34
|
+
concurrent-ruby (1.3.4)
|
|
31
35
|
connection_pool (2.4.1)
|
|
32
|
-
diff-lcs (1.
|
|
36
|
+
diff-lcs (1.6.2)
|
|
33
37
|
docile (1.4.0)
|
|
34
38
|
drb (2.2.1)
|
|
35
39
|
excon (0.111.0)
|
|
36
40
|
faraday (2.10.0)
|
|
37
41
|
faraday-net_http (>= 2.0, < 3.2)
|
|
38
42
|
logger
|
|
39
|
-
faraday-net_http (3.1.
|
|
43
|
+
faraday-net_http (3.1.1)
|
|
40
44
|
net-http
|
|
41
|
-
gem-release (2.2.
|
|
45
|
+
gem-release (2.2.4)
|
|
42
46
|
git (1.19.1)
|
|
43
47
|
addressable (~> 2.8)
|
|
44
48
|
rchardet (~> 1.8)
|
|
45
49
|
hamster (3.0.0)
|
|
46
50
|
concurrent-ruby (~> 1.0)
|
|
47
|
-
i18n (1.14.
|
|
51
|
+
i18n (1.14.6)
|
|
48
52
|
concurrent-ruby (~> 1.0)
|
|
49
53
|
immutable-struct (2.4.1)
|
|
50
|
-
json (2.
|
|
51
|
-
language_server-protocol (3.17.0.
|
|
54
|
+
json (2.12.2)
|
|
55
|
+
language_server-protocol (3.17.0.5)
|
|
52
56
|
lino (4.1.0)
|
|
53
57
|
childprocess (~> 5.0.0)
|
|
54
58
|
hamster (~> 3.0)
|
|
55
59
|
open4 (~> 1.3)
|
|
56
|
-
|
|
60
|
+
lint_roller (1.1.0)
|
|
61
|
+
logger (1.6.2)
|
|
57
62
|
memfs (1.0.0)
|
|
58
|
-
minitest (5.
|
|
59
|
-
mutex_m (0.2.0)
|
|
63
|
+
minitest (5.25.4)
|
|
60
64
|
net-http (0.4.1)
|
|
61
65
|
uri
|
|
62
66
|
octokit (8.1.0)
|
|
@@ -64,72 +68,74 @@ GEM
|
|
|
64
68
|
faraday (>= 1, < 3)
|
|
65
69
|
sawyer (~> 0.9)
|
|
66
70
|
open4 (1.3.4)
|
|
67
|
-
parallel (1.
|
|
68
|
-
parser (3.3.
|
|
71
|
+
parallel (1.27.0)
|
|
72
|
+
parser (3.3.8.0)
|
|
69
73
|
ast (~> 2.4.1)
|
|
70
74
|
racc
|
|
75
|
+
prism (1.4.0)
|
|
71
76
|
public_suffix (6.0.1)
|
|
72
|
-
racc (1.8.
|
|
77
|
+
racc (1.8.1)
|
|
73
78
|
rainbow (3.1.1)
|
|
74
|
-
rake (13.
|
|
75
|
-
rake_circle_ci (0.
|
|
79
|
+
rake (13.3.0)
|
|
80
|
+
rake_circle_ci (0.13.0)
|
|
76
81
|
colored2 (~> 3.1)
|
|
77
82
|
excon (~> 0.72)
|
|
78
|
-
rake_factory (~> 0.
|
|
83
|
+
rake_factory (~> 0.33)
|
|
79
84
|
sshkey (~> 2.0)
|
|
80
85
|
rake_factory (0.33.0)
|
|
81
86
|
activesupport (>= 4)
|
|
82
87
|
rake (~> 13.0)
|
|
83
|
-
rake_git (0.
|
|
88
|
+
rake_git (0.3.0.pre.2)
|
|
84
89
|
colored2 (~> 3.1)
|
|
85
90
|
git (~> 1.13, >= 1.13.2)
|
|
86
|
-
rake_factory (
|
|
87
|
-
rake_github (0.
|
|
91
|
+
rake_factory (~> 0.33)
|
|
92
|
+
rake_github (0.15.0)
|
|
88
93
|
colored2 (~> 3.1)
|
|
89
94
|
octokit (>= 4.16, < 9.0)
|
|
90
|
-
rake_factory (~> 0.
|
|
95
|
+
rake_factory (~> 0.33)
|
|
91
96
|
sshkey (~> 2.0)
|
|
92
|
-
rake_gpg (0.
|
|
93
|
-
rake_factory (~> 0.
|
|
94
|
-
ruby_gpg2 (~> 0.
|
|
95
|
-
rake_ssh (0.
|
|
97
|
+
rake_gpg (0.20.0)
|
|
98
|
+
rake_factory (~> 0.33)
|
|
99
|
+
ruby_gpg2 (~> 0.12)
|
|
100
|
+
rake_ssh (0.12.0)
|
|
96
101
|
colored2 (~> 3.1)
|
|
97
|
-
rake_factory (~> 0.
|
|
102
|
+
rake_factory (~> 0.33)
|
|
98
103
|
sshkey (~> 2.0)
|
|
99
104
|
rchardet (1.8.0)
|
|
100
|
-
regexp_parser (2.
|
|
101
|
-
|
|
102
|
-
strscan
|
|
103
|
-
rspec (3.13.0)
|
|
105
|
+
regexp_parser (2.10.0)
|
|
106
|
+
rspec (3.13.1)
|
|
104
107
|
rspec-core (~> 3.13.0)
|
|
105
108
|
rspec-expectations (~> 3.13.0)
|
|
106
109
|
rspec-mocks (~> 3.13.0)
|
|
107
|
-
rspec-core (3.13.
|
|
110
|
+
rspec-core (3.13.4)
|
|
108
111
|
rspec-support (~> 3.13.0)
|
|
109
|
-
rspec-expectations (3.13.
|
|
112
|
+
rspec-expectations (3.13.5)
|
|
110
113
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
111
114
|
rspec-support (~> 3.13.0)
|
|
112
|
-
rspec-mocks (3.13.
|
|
115
|
+
rspec-mocks (3.13.5)
|
|
113
116
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
114
117
|
rspec-support (~> 3.13.0)
|
|
115
|
-
rspec-support (3.13.
|
|
116
|
-
rubocop (1.
|
|
118
|
+
rspec-support (3.13.4)
|
|
119
|
+
rubocop (1.76.0)
|
|
117
120
|
json (~> 2.3)
|
|
118
|
-
language_server-protocol (
|
|
121
|
+
language_server-protocol (~> 3.17.0.2)
|
|
122
|
+
lint_roller (~> 1.1.0)
|
|
119
123
|
parallel (~> 1.10)
|
|
120
124
|
parser (>= 3.3.0.2)
|
|
121
125
|
rainbow (>= 2.2.2, < 4.0)
|
|
122
|
-
regexp_parser (>= 2.
|
|
123
|
-
|
|
124
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
126
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
127
|
+
rubocop-ast (>= 1.45.0, < 2.0)
|
|
125
128
|
ruby-progressbar (~> 1.7)
|
|
126
|
-
unicode-display_width (>= 2.4.0, <
|
|
127
|
-
rubocop-ast (1.
|
|
128
|
-
parser (>= 3.3.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
rubocop (
|
|
129
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
130
|
+
rubocop-ast (1.45.0)
|
|
131
|
+
parser (>= 3.3.7.2)
|
|
132
|
+
prism (~> 1.4)
|
|
133
|
+
rubocop-rake (0.7.1)
|
|
134
|
+
lint_roller (~> 1.1)
|
|
135
|
+
rubocop (>= 1.72.1)
|
|
136
|
+
rubocop-rspec (3.6.0)
|
|
137
|
+
lint_roller (~> 1.1)
|
|
138
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
133
139
|
ruby-progressbar (1.13.0)
|
|
134
140
|
ruby_git_crypt (0.1.0)
|
|
135
141
|
immutable-struct (~> 2.4)
|
|
@@ -139,6 +145,7 @@ GEM
|
|
|
139
145
|
sawyer (0.9.2)
|
|
140
146
|
addressable (>= 2.3.5)
|
|
141
147
|
faraday (>= 0.17.3, < 3)
|
|
148
|
+
securerandom (0.4.0)
|
|
142
149
|
simplecov (0.22.0)
|
|
143
150
|
docile (~> 1.1)
|
|
144
151
|
simplecov-html (~> 0.11)
|
|
@@ -146,11 +153,12 @@ GEM
|
|
|
146
153
|
simplecov-html (0.12.3)
|
|
147
154
|
simplecov_json_formatter (0.1.4)
|
|
148
155
|
sshkey (2.0.0)
|
|
149
|
-
strscan (3.1.0)
|
|
150
156
|
tzinfo (2.0.6)
|
|
151
157
|
concurrent-ruby (~> 1.0)
|
|
152
|
-
unicode-display_width (
|
|
153
|
-
|
|
158
|
+
unicode-display_width (3.1.4)
|
|
159
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
160
|
+
unicode-emoji (4.0.4)
|
|
161
|
+
uri (0.13.2)
|
|
154
162
|
|
|
155
163
|
PLATFORMS
|
|
156
164
|
arm64-darwin-21
|
data/README.md
CHANGED
|
@@ -22,6 +22,44 @@ Or install it yourself as:
|
|
|
22
22
|
|
|
23
23
|
TODO: Write docs.
|
|
24
24
|
|
|
25
|
+
### Unlocking git-crypt with an encrypted GPG key
|
|
26
|
+
|
|
27
|
+
The `unlock_with_encrypted_gpg_key` task unlocks git-crypt using a
|
|
28
|
+
passphrase-encrypted GPG key, useful in CI environments. It decrypts an
|
|
29
|
+
OpenSSL-encrypted GPG private key, imports it into GPG and runs
|
|
30
|
+
`git-crypt unlock`. The passphrase is read from an environment variable so
|
|
31
|
+
that it never appears on the process command line.
|
|
32
|
+
|
|
33
|
+
By default the key is imported into a temporary GPG home directory (created
|
|
34
|
+
under the GPG work directory) which is used for both the import and the
|
|
35
|
+
`git-crypt unlock`, so the private key never lands in the default keyring
|
|
36
|
+
and does not persist after the task completes. A specific home directory can
|
|
37
|
+
be provided via `gpg_home_directory`, in which case it is used as-is.
|
|
38
|
+
|
|
39
|
+
```ruby
|
|
40
|
+
require 'rake_git_crypt'
|
|
41
|
+
|
|
42
|
+
RakeGitCrypt::Tasks::UnlockWithEncryptedGPGKey.define(
|
|
43
|
+
encrypted_key_path: '.github/gpg.private.enc',
|
|
44
|
+
passphrase_env_var_name: 'ENCRYPTION_PASSPHRASE'
|
|
45
|
+
)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Both parameters are optional and default to the values shown above. The task
|
|
49
|
+
is also included in the standard task set, where the same settings can be
|
|
50
|
+
provided via `unlock_with_encrypted_gpg_key_encrypted_key_path` and
|
|
51
|
+
`unlock_with_encrypted_gpg_key_passphrase_env_var_name`, with the GPG home
|
|
52
|
+
and work directories controlled by the shared `gpg_home_directory` and
|
|
53
|
+
`gpg_work_directory` settings.
|
|
54
|
+
|
|
55
|
+
The passphrase is expected to be provided as a secret (for example the
|
|
56
|
+
`ENCRYPTION_PASSPHRASE` GitHub Actions or Dependabot secret) and exposed to
|
|
57
|
+
the step that runs the task:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
ENCRYPTION_PASSPHRASE="..." bundle exec rake unlock_with_encrypted_gpg_key
|
|
61
|
+
```
|
|
62
|
+
|
|
25
63
|
## Development
|
|
26
64
|
|
|
27
65
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
@@ -24,6 +24,11 @@ module RakeGitCrypt
|
|
|
24
24
|
|
|
25
25
|
parameter :unlock_key_paths
|
|
26
26
|
|
|
27
|
+
parameter :unlock_with_encrypted_gpg_key_encrypted_key_path,
|
|
28
|
+
default: '.github/gpg.private.enc'
|
|
29
|
+
parameter :unlock_with_encrypted_gpg_key_passphrase_env_var_name,
|
|
30
|
+
default: 'ENCRYPTION_PASSPHRASE'
|
|
31
|
+
|
|
27
32
|
parameter :install_commit_message_template,
|
|
28
33
|
default: 'Installing git-crypt.'
|
|
29
34
|
parameter :install_commit_task_name
|
|
@@ -52,6 +57,8 @@ module RakeGitCrypt
|
|
|
52
57
|
parameter :init_task_name, default: :init
|
|
53
58
|
parameter :lock_task_name, default: :lock
|
|
54
59
|
parameter :unlock_task_name, default: :unlock
|
|
60
|
+
parameter :unlock_with_encrypted_gpg_key_task_name,
|
|
61
|
+
default: :unlock_with_encrypted_gpg_key
|
|
55
62
|
parameter :install_task_name, default: :install
|
|
56
63
|
parameter :uninstall_task_name, default: :uninstall
|
|
57
64
|
parameter :reinstall_task_name, default: :reinstall
|
|
@@ -88,6 +95,24 @@ module RakeGitCrypt
|
|
|
88
95
|
ts.unlock_key_paths
|
|
89
96
|
end
|
|
90
97
|
})
|
|
98
|
+
task(Tasks::UnlockWithEncryptedGPGKey,
|
|
99
|
+
{
|
|
100
|
+
name: RakeFactory::DynamicValue.new do |ts|
|
|
101
|
+
ts.unlock_with_encrypted_gpg_key_task_name
|
|
102
|
+
end,
|
|
103
|
+
encrypted_key_path: RakeFactory::DynamicValue.new do |ts|
|
|
104
|
+
ts.unlock_with_encrypted_gpg_key_encrypted_key_path
|
|
105
|
+
end,
|
|
106
|
+
passphrase_env_var_name: RakeFactory::DynamicValue.new do |ts|
|
|
107
|
+
ts.unlock_with_encrypted_gpg_key_passphrase_env_var_name
|
|
108
|
+
end,
|
|
109
|
+
gpg_home_directory: RakeFactory::DynamicValue.new do |ts|
|
|
110
|
+
ts.gpg_home_directory
|
|
111
|
+
end,
|
|
112
|
+
gpg_work_directory: RakeFactory::DynamicValue.new do |ts|
|
|
113
|
+
ts.gpg_work_directory
|
|
114
|
+
end
|
|
115
|
+
})
|
|
91
116
|
task(Tasks::Install,
|
|
92
117
|
{
|
|
93
118
|
name: RakeFactory::DynamicValue.new do |ts|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'lino'
|
|
4
|
+
require 'rake_factory'
|
|
5
|
+
require 'ruby_git_crypt'
|
|
6
|
+
require 'ruby_gpg2'
|
|
7
|
+
require 'tmpdir'
|
|
8
|
+
|
|
9
|
+
require_relative '../home'
|
|
10
|
+
|
|
11
|
+
module RakeGitCrypt
|
|
12
|
+
module Tasks
|
|
13
|
+
class UnlockWithEncryptedGPGKey < RakeFactory::Task
|
|
14
|
+
default_name :unlock_with_encrypted_gpg_key
|
|
15
|
+
default_description 'Unlock git-crypt using a passphrase-encrypted ' \
|
|
16
|
+
'GPG key.'
|
|
17
|
+
|
|
18
|
+
parameter :encrypted_key_path, default: '.github/gpg.private.enc'
|
|
19
|
+
parameter :passphrase_env_var_name, default: 'ENCRYPTION_PASSPHRASE'
|
|
20
|
+
parameter :gpg_home_directory
|
|
21
|
+
parameter :gpg_work_directory, default: '/tmp'
|
|
22
|
+
|
|
23
|
+
action do
|
|
24
|
+
ensure_passphrase_present
|
|
25
|
+
ensure_encrypted_key_present
|
|
26
|
+
|
|
27
|
+
puts('Unlocking git-crypt using passphrase-encrypted GPG key...')
|
|
28
|
+
with_gpg_home_directory do |home_directory|
|
|
29
|
+
with_decrypted_key do |decrypted_key_path|
|
|
30
|
+
import_key(decrypted_key_path, home_directory)
|
|
31
|
+
end
|
|
32
|
+
unlock(home_directory)
|
|
33
|
+
end
|
|
34
|
+
puts('Done.')
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
private
|
|
38
|
+
|
|
39
|
+
def with_gpg_home_directory(&block)
|
|
40
|
+
Home.new(gpg_work_directory, gpg_home_directory || :temporary)
|
|
41
|
+
.with_resolved_directory do |home_directory|
|
|
42
|
+
block.call(home_directory)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def ensure_passphrase_present
|
|
47
|
+
passphrase = ENV.fetch(passphrase_env_var_name, nil)
|
|
48
|
+
return unless passphrase.nil? || passphrase.empty?
|
|
49
|
+
|
|
50
|
+
raise(RakeFactory::RequiredParameterUnset, passphrase_missing_message)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def ensure_encrypted_key_present
|
|
54
|
+
return if File.file?(encrypted_key_path)
|
|
55
|
+
|
|
56
|
+
raise(encrypted_key_missing_message)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def with_decrypted_key
|
|
60
|
+
Dir.mktmpdir('git-crypt-unlock', gpg_work_directory) do |directory|
|
|
61
|
+
decrypted_key_path = File.join(directory, 'gpg.private')
|
|
62
|
+
decrypt_key(decrypted_key_path)
|
|
63
|
+
yield decrypted_key_path
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def decrypt_key(decrypted_key_path)
|
|
68
|
+
openssl_command(decrypted_key_path).build.execute
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def openssl_command(decrypted_key_path)
|
|
72
|
+
Lino
|
|
73
|
+
.builder_for_command('openssl')
|
|
74
|
+
.with_options_after_subcommands
|
|
75
|
+
.with_subcommand('aes-256-cbc')
|
|
76
|
+
.with_flag('-d')
|
|
77
|
+
.with_option('-md', 'sha1')
|
|
78
|
+
.with_option('-in', encrypted_key_path)
|
|
79
|
+
.with_option('-out', decrypted_key_path)
|
|
80
|
+
.with_option('-pass', "env:#{passphrase_env_var_name}")
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def import_key(decrypted_key_path, home_directory)
|
|
84
|
+
RubyGPG2.import(
|
|
85
|
+
key_file_paths: [decrypted_key_path],
|
|
86
|
+
work_directory: gpg_work_directory,
|
|
87
|
+
home_directory:
|
|
88
|
+
)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def unlock(home_directory)
|
|
92
|
+
RubyGitCrypt.unlock(
|
|
93
|
+
{},
|
|
94
|
+
{ environment: { GNUPGHOME: home_directory } }
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def passphrase_missing_message
|
|
99
|
+
'No passphrase found in environment variable ' \
|
|
100
|
+
"'#{passphrase_env_var_name}'. This passphrase decrypts the CI " \
|
|
101
|
+
'GPG private key and is stored as the ' \
|
|
102
|
+
"'#{passphrase_env_var_name}' secret in the repository's GitHub " \
|
|
103
|
+
'Actions and Dependabot secrets stores (Settings > Secrets and ' \
|
|
104
|
+
'variables). Expose it to this step, for example with:' \
|
|
105
|
+
"\n env:\n #{passphrase_env_var_name}: " \
|
|
106
|
+
"${{ secrets.#{passphrase_env_var_name} }}\n" \
|
|
107
|
+
'For Dependabot-triggered runs the secret must also be mirrored ' \
|
|
108
|
+
'into the Dependabot secrets store.'
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def encrypted_key_missing_message
|
|
112
|
+
'Encrypted GPG private key not found at ' \
|
|
113
|
+
"'#{encrypted_key_path}'. Set the encrypted_key_path parameter " \
|
|
114
|
+
'to the location of the OpenSSL-encrypted GPG private key ' \
|
|
115
|
+
'(repositories part-way through migration may still hold it at ' \
|
|
116
|
+
"'.circleci/gpg.private.enc')."
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
data/lib/rake_git_crypt/tasks.rb
CHANGED
data/rake_git_crypt.gemspec
CHANGED
|
@@ -37,6 +37,7 @@ Gem::Specification.new do |spec|
|
|
|
37
37
|
spec.required_ruby_version = '>= 3.1'
|
|
38
38
|
|
|
39
39
|
spec.add_dependency 'colored2', '~> 3.1'
|
|
40
|
+
spec.add_dependency 'lino', '~> 4.1'
|
|
40
41
|
spec.add_dependency 'rake_factory', '~> 0.33'
|
|
41
42
|
spec.add_dependency 'ruby_git_crypt', '~> 0.1'
|
|
42
43
|
spec.add_dependency 'ruby_gpg2', '~> 0.12'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rake_git_crypt
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.0.pre.
|
|
4
|
+
version: 0.3.0.pre.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- InfraBlocks Maintainers
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-07-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colored2
|
|
@@ -24,6 +24,20 @@ dependencies:
|
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '3.1'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: lino
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '4.1'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '4.1'
|
|
27
41
|
- !ruby/object:Gem::Dependency
|
|
28
42
|
name: rake_factory
|
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -95,6 +109,7 @@ files:
|
|
|
95
109
|
- lib/rake_git_crypt/tasks/reinstall.rb
|
|
96
110
|
- lib/rake_git_crypt/tasks/uninstall.rb
|
|
97
111
|
- lib/rake_git_crypt/tasks/unlock.rb
|
|
112
|
+
- lib/rake_git_crypt/tasks/unlock_with_encrypted_gpg_key.rb
|
|
98
113
|
- lib/rake_git_crypt/template.rb
|
|
99
114
|
- lib/rake_git_crypt/version.rb
|
|
100
115
|
- rake_git_crypt.gemspec
|
|
@@ -103,7 +118,7 @@ licenses:
|
|
|
103
118
|
- MIT
|
|
104
119
|
metadata:
|
|
105
120
|
rubygems_mfa_required: 'false'
|
|
106
|
-
post_install_message:
|
|
121
|
+
post_install_message:
|
|
107
122
|
rdoc_options: []
|
|
108
123
|
require_paths:
|
|
109
124
|
- lib
|
|
@@ -119,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
119
134
|
version: 1.3.1
|
|
120
135
|
requirements: []
|
|
121
136
|
rubygems_version: 3.3.7
|
|
122
|
-
signing_key:
|
|
137
|
+
signing_key:
|
|
123
138
|
specification_version: 4
|
|
124
139
|
summary: Rake tasks for interacting with git-crypt.
|
|
125
140
|
test_files: []
|