security_release_finalize:sync_remotes job is failing due to permissions error
🔥 Problem
The security_release_finalize:sync_remotes
job in the security release pipeline is failing due to what seems to be a permissions error.
Example job: https://ops.gitlab.net/gitlab-org/release/tools/-/jobs/10762591
Error output:
2023-08-01 18:10:58.645175 I ReleaseTools::Security::SyncRemotesService -- Syncing remotes -- {:project=>gitlab-org/security/gitlab-foss, :remotes=>[:canonical, :dev, :security]}
2023-08-01 18:10:58.749572 F ReleaseTools::Security::SyncRemotesService -- Sync remotes failed. If this job continues to fail, the sync can be run using chatops:
`/chatops run release sync_remotes --security`.
-- {:error=>#<ReleaseTools::RemoteRepository::CannotCloneError:"Failed to clone git@gitlab.com:gitlab-org/gitlab-foss.git to /tmp/gitlab-foss\n\n Host key verification failed.\r\n fatal: Could not read from remote repository.\n \n Please make sure you have the correct access rights\n and the repository exists.\n ">}
I, [2023-08-01T18:10:58.819455 #15] INFO -- sentry: ** [Sentry] [Transport] Sending envelope with items [event] 8579668417b6440fafa33188324639af to Sentry
2023-08-01 18:10:58.749776 I ReleaseTools::Slack::Security::Notifier -- Posting slack message -- {:job_type=>"Sync remotes", :status=>:failed}
2023-08-01 18:10:58.961302 F Rake::Task -- Task failed -- Exception: ReleaseTools::Security::SyncRemotesService::CouldNotSyncError: ReleaseTools::Security::SyncRemotesService::CouldNotSyncError
The chatops version of the job run with /chatops run release sync_remotes --security
succeeded: https://ops.gitlab.net/gitlab-org/release/tools/-/jobs/10762597
🚒 Solution
Determine the nature of the permissions bug (or other cause) and update the security release pipeline job.