Deploy keys and CI/CD GitHub accounts are two different methods for allowing Jenkins to access a GitHub repository.
- Deploy keys: The advantage of deploy keys is that they can be easily revoked and also it does not require creating a Github account.
- CI/CD GitHub accounts: A CI/CD GitHub account is a separate GitHub account that is used specifically for your CI/CD pipeline. This account can be granted access to multiple repositories and can be used to trigger builds and deployments when code is pushed. The advantage of using a separate account is that you can easily revoke access to all of the repositories it has access to, if necessary. Additionally, you can use the access levels like branch protection and commit status check features provided by Github to ensure security and quality.
Which method you choose will depend on your specific needs and how you want to manage access to your GitHub repositories. If you have a small number of repositories, you can use deploy keys. But if you have a large number of repositories and you want to be able to manage access more easily, you may want to use a separate CI/CD GitHub account.