Skip to content

Commit 0f73794

Browse files
committed
feat: allow user not to add SSH key to Gitlab
1 parent 3b79305 commit 0f73794

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

github2gitlab/main.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ def get_parser():
130130
parser.add_argument('--ignore-closed', action='store_const',
131131
const=True,
132132
help='ignore pull requests closed and not merged')
133+
parser.add_argument('--skip-add-key', action='store_const',
134+
const=True,
135+
help='do not attempt to add local SSH key to Gitlab')
133136
parser.add_argument('--skip-pull-requests', action='store_const',
134137
const=True,
135138
help='do not mirror PR to MR')
@@ -152,7 +155,8 @@ def factory(argv):
152155
return GitHub2GitLab(GitHub2GitLab.get_parser().parse_args(argv))
153156

154157
def run(self):
155-
self.add_key()
158+
if not self.args.skip_add_key:
159+
self.add_key()
156160
if self.add_project():
157161
self.unprotect_branches()
158162
self.git_mirror()

0 commit comments

Comments
 (0)