Programmatically populate host_key in git-gate #333

Closed
opened 2026-07-09 11:43:39 -04:00 by didericis · 0 comments
Owner

When we fail to add a host_key to git-gate, we end up getting 403 errors when trying to clone the repo. We shouldn't have to manually add those host keys in order to clone. Instead, we should do the following:

  1. In preflight, check to see if there are any git-gate repos configured with no host key
  2. If no host key is in a repo, grab the host key using python stdlib, display it to the user, and confirm whether it's correct. If the user says no, quit
  3. If the user says yes, ask the user whether they'd like to persist it to the bottle config they saved it from. If they say yes, write that host key to the bottle manifest. If no, only add the host key in memory when launching/have it be temporary

When launching headlessly, throw an error if there's no host_key configured.

When we fail to add a `host_key` to `git-gate`, we end up getting 403 errors when trying to clone the repo. We shouldn't have to manually add those host keys in order to clone. Instead, we should do the following: 1. In preflight, check to see if there are any `git-gate` repos configured with no host key 2. If no host key is in a repo, grab the host key using python stdlib, display it to the user, and confirm whether it's correct. If the user says no, quit 3. If the user says yes, ask the user whether they'd like to persist it to the bottle config they saved it from. If they say yes, write that host key to the bottle manifest. If no, only add the host key in memory when launching/have it be temporary When launching headlessly, throw an error if there's no `host_key` configured.
didericis added the Kind/Feature label 2026-07-09 11:44:39 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: didericis/bot-bottle#333