git-well 0.2.1__tar.gz → 0.2.3__tar.gz
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.
- {git_well-0.2.1 → git_well-0.2.3}/PKG-INFO +1 -1
- {git_well-0.2.1 → git_well-0.2.3}/git_well/__init__.py +1 -1
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_autoconf_gpgsign.py +22 -12
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_remote_protocol.py +1 -1
- {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/PKG-INFO +1 -1
- {git_well-0.2.1 → git_well-0.2.3}/README.rst +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/__main__.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/__main__.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/_utils.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/_utils.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/demo/__init__.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_autoconf_gpgsign.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_branch_cleanup.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_branch_cleanup.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_branch_upgrade.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_branch_upgrade.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_discover_remote.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_discover_remote.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_rebase_add_continue.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_rebase_add_continue.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_remote_protocol.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_squash_streaks.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_squash_streaks.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_stats.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_stats.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_sync.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_sync.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_track_upstream.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/git_track_upstream.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/main.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/main.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/py.typed +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/repo.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well/repo.pyi +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/SOURCES.txt +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/dependency_links.txt +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/entry_points.txt +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/requires.txt +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/top_level.txt +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/pyproject.toml +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/setup.cfg +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/setup.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/tests/test_cli.py +0 -0
- {git_well-0.2.1 → git_well-0.2.3}/tests/test_import.py +0 -0
|
@@ -9,6 +9,7 @@ class GitAutoconfGpgsignCLI(scfg.DataConfig):
|
|
|
9
9
|
|
|
10
10
|
remote = scfg.Value(None, help='param1')
|
|
11
11
|
repo_dpath = scfg.Value('.', help='repo to set gpg for')
|
|
12
|
+
email = scfg.Value(None, help='The email the the signing GPG key is associated with. If unspecified attempt to infer via ssh credentials')
|
|
12
13
|
|
|
13
14
|
@classmethod
|
|
14
15
|
def main(cls, cmdline=1, **kwargs):
|
|
@@ -54,12 +55,15 @@ class GitAutoconfGpgsignCLI(scfg.DataConfig):
|
|
|
54
55
|
if cand.exists():
|
|
55
56
|
identify_file_cands.add(cand)
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
if config.email is None:
|
|
59
|
+
email_candidates = ub.oset()
|
|
60
|
+
for id_fpath in identify_file_cands:
|
|
61
|
+
pub_key_fpath = id_fpath.augment(tail='.pub')
|
|
62
|
+
if pub_key_fpath.exists():
|
|
63
|
+
pub_email = pub_key_fpath.read_text().strip().split(' ')[-1]
|
|
64
|
+
email_candidates.add(pub_email)
|
|
65
|
+
else:
|
|
66
|
+
email_candidates = [config.email]
|
|
63
67
|
|
|
64
68
|
gpg_candidates = []
|
|
65
69
|
for email in email_candidates:
|
|
@@ -73,7 +77,10 @@ class GitAutoconfGpgsignCLI(scfg.DataConfig):
|
|
|
73
77
|
|
|
74
78
|
unique_fprs = {cand['fpr'] for cand in gpg_candidates}
|
|
75
79
|
|
|
76
|
-
if len(unique_fprs)
|
|
80
|
+
if len(unique_fprs) == 0:
|
|
81
|
+
raise Exception('Unable to find any gpg candidates. '
|
|
82
|
+
'Is the repo not using git/ssh credentials?')
|
|
83
|
+
elif len(unique_fprs) != 1:
|
|
77
84
|
print(f'unique_fprs = {ub.urepr(unique_fprs, nl=1)}')
|
|
78
85
|
print('gpg_candidates = {}'.format(ub.urepr(gpg_candidates, nl=1)))
|
|
79
86
|
raise AssertionError('need to choose 1')
|
|
@@ -99,11 +106,14 @@ def lookup_gpg_keyinfos(identifier, verbose=0, capabilities=None,
|
|
|
99
106
|
allow_subkey=True, allow_mainkey=True, full=True,
|
|
100
107
|
filter_expired=True, mintrust=None):
|
|
101
108
|
"""
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
Creates a table of information about GPG key candidates that match a query.
|
|
110
|
+
|
|
111
|
+
Ignore:
|
|
112
|
+
python ~/local/scripts/xgpg.py lookup_keyid "Emmy"
|
|
113
|
+
python ~/local/scripts/xgpg.py lookup_keyid "Crall" --allow_mainkey=False --capabilities=sign
|
|
114
|
+
python ~/local/scripts/xgpg.py lookup_keyid "Crall" --allow_mainkey=False --capabilities=encrypt
|
|
115
|
+
python ~/local/scripts/xgpg.py lookup_keyid "Crall" --allow_mainkey=False --capabilities=auth
|
|
116
|
+
python ~/local/scripts/xgpg.py lookup_keyid "Jonathan Crall"
|
|
107
117
|
"""
|
|
108
118
|
if capabilities is None:
|
|
109
119
|
capabilities = {'certify'}
|
|
@@ -26,7 +26,7 @@ class GitRemoteProtocol(scfg.DataConfig):
|
|
|
26
26
|
should be. (i.e. if there is only one, use that, otherwise ask).
|
|
27
27
|
'''))
|
|
28
28
|
|
|
29
|
-
protocol = scfg.Value('
|
|
29
|
+
protocol = scfg.Value('git', position=2, choices=VALID_PROTOCOLS, help=ub.paragraph(
|
|
30
30
|
'''
|
|
31
31
|
The protocol to change to.
|
|
32
32
|
'''))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|