summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/migrate/migrate_keys.rake15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/tasks/migrate/migrate_keys.rake b/lib/tasks/migrate/migrate_keys.rake
new file mode 100644
index 00000000000..b13d984907b
--- /dev/null
+++ b/lib/tasks/migrate/migrate_keys.rake
@@ -0,0 +1,15 @@
+desc "GITLAB | Migrate SSH Keys"
+task migrate_keys: :environment do
+ puts "This will add fingerprint to ssh keys in db"
+ ask_to_continue
+
+ Key.find_each(batch_size: 20) do |key|
+ if key.valid? && key.save
+ print '.'
+ else
+ print 'F'
+ end
+ end
+end
+
+