Skip to content

Campaigns cannot be applied as a normal user when the code host is configured to use SSH to clone repositories

Created by: LawnGnome

This occurs because gitserver will attempt to inject the user credential into the ssh:// URL, which causes Git to be unable to parse the URL, after which a spurious "host not found" error is returned. This is a lie, but the issue is real.

Plan of attack

At a high level, we can deal with this by detecting code hosts with this configuration, then prompting users to add a public key (which we can generate and store) to their account when adding a PAT.

In terms of issues, this breaks down into:

A bonus quest later might be to automatically provision the key into the code host if the user scopes their PAT to allow this.