Deletion of project deletes deploy keys enabled in project
Summary
When deleting project all keys enabled in this project are deleted from gitlab. This deletes keys that are also enabled in other projects. This is done silently without informing user that those keys should be disbaled prior to project deletion.
Steps to reproduce
Create 2-3 projects and register deploy keys to them. Delete a project. Confirm that deploy key is deleted from other projects it was registered.
Example Project
This is related to project deletion, not running project.
What is the current bug behavior?
If same deploy key is used on multiple projects (eg. key used by jenkins to access those projects) it brakes all other projects.
What is the expected correct behavior?
Deploy keys should not be deleted at all, or warning message should be shown to user.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System: Ubuntu 16.04 Current User: git Using RVM: no Ruby Version: 2.3.3p222 Gem Version: 2.6.6 Bundler Version:1.13.7 Rake Version: 10.5.0 Redis Version: 3.2.5 Git Version: 2.13.0 Sidekiq Version:5.0.0 Go Version: unknownGitLab information Version: 9.4.0 Revision: 9bbe2ac Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: XXX HTTP Clone URL: XXX SSH Clone URL: XXX Using LDAP: no Using Omniauth: yes Omniauth Providers: azure_oauth2GitLab Shell Version: 5.3.1 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git