By default, always try to auth to OCI remotes

This makes for instance docker hub work.
This commit is contained in:
Alexander Larsson
2020-05-04 12:35:16 +02:00
committed by Alexander Larsson
parent d145723fe3
commit fdfcae7a91
2 changed files with 9 additions and 0 deletions

View File

@@ -49,6 +49,10 @@ flatpak_auth_new_for_remote (FlatpakDir *dir,
if (!ostree_repo_get_remote_option (repo, remote, FLATPAK_REMOTE_CONFIG_AUTHENTICATOR_NAME, NULL, &name, error))
return NULL;
}
if (name == NULL && flatpak_dir_get_remote_oci (dir, remote))
name = g_strdup ("org.flatpak.Authenticator.Oci");
if (name == NULL || *name == 0 /* or if no repo */)
{
flatpak_fail (error, _("No authenticator configured for remote `%s`"), remote);

View File

@@ -10683,6 +10683,11 @@ _flatpak_dir_get_remote_state (FlatpakDir *self,
}
}
if (flatpak_dir_get_remote_oci (self, remote_or_uri))
{
state->default_token_type = 1;
}
if (state->summary != NULL) /* In the optional case we might not have a summary */
{
VarSummaryRef summary = var_summary_from_gvariant (state->summary);