{% load djblets_utils i18n rbadmintags %} {% url 'settings-ssh' as ssh_settings_url %} {# SSH Public Key information #}

Some repositories (usually self-hosted repositories) require an SSH public key for secure access.

{% if adminform.form.public_key %} {% comment %} Use a
here to avoid extra trailing padding when the

{% else %}

{% trans "Set up your SSH key" %}

{% endif %}
{# Account link succeeded, with form errors #} {% if adminform.form.errors and adminform.form.hosting_account_linked %}

{% trans "Account successfully linked." %}

{% blocktrans %} Your hosting account was successfully linked. You will not need to link it again when fixing the remaining errors. {% endblocktrans %}

{% endif %} {# Host identity confirmation #} {% with form.hostkeyerror as hostkeyerror %} {% with form.certerror as certerror %} {% with form.certerror.certificate as certificate %} {% if hostkeyerror or certerror %}
{% with error_parts=hostkeyerror|default:certerror|split_error_title_text %}

{{error_parts.0}}

{% if error_parts.1 %} {{error_parts.1|paragraphs}} {% endif %} {% endwith %} {% if hostkeyerror %} {% if hostkeyerror.key %}

RSA key fingerprint is {{hostkeyerror.key}}.

{% endif %} {% if hostkeyerror.expected_key %}

Expected fingerprint is {{hostkeyerror.expected_key}}.

{% endif %} {% elif certerror %} {% if certificate.failures %}

{% trans "There were errors validating this certificate:" %}

    {% for failure in certificate.failures %}
  • {{failure}}
  • {% endfor %}
{% endif %}

{% trans "Certificate information:" %}

{% if certificate.hostname %}
{% trans "Hostname:" %}
{{certificate.hostname}}
{% endif %} {% if certificate.valid_from %}
{% trans "Valid:" %}
{% blocktrans with certificate.valid_from as valid_from and certificate.valid_until as valid_until %} from {{valid_from}} until {{valid_until}} {% endblocktrans %}
{% endif %} {% if certificate.issuer %}
{% trans "Issuer:" %}
{{certificate.issuer}}
{% endif %}
{% trans "Fingerprint:" %}
{{certificate.fingerprint}}
{% endif %}

{% blocktrans %} Do you trust this host, or do you want to go back and edit the repository information? {% endblocktrans %}

{% endif %} {% endwith %} {% endwith %} {% endwith %} {# Missing SSH key #} {% with form.userkeyerror as userkeyerror %} {% if userkeyerror %}

{% blocktrans %} This repository requires a valid SSH public key. You can create or upload a new SSH key, add it to the server, and then try again. {% endblocktrans %}

{% blocktrans %} Note that replacing an existing key may impact other repositories. {% endblocktrans %}

{% endif %} {% endwith %}