Difficulty with cargo registry authentication in Linux

I am trying to authenticate with a cargo registry feed using libsecret, but I am running into some issues. I am on on Ubuntu 22.04, using cargo 1.78.0, and I am trying to connect to an Azure DevOps feed (cargo-feeds) I created on my own ADO project.

When I try to run cargo login --registry cargo-feeds I get the following errors

(process:92117): GLib-GObject-WARNING **: 18:55:43.280: cannot register existing type 'SecretService'

(process:92117): GLib-GObject-WARNING **: 18:55:43.280: cannot add private field to invalid (non-instantiatable) type '<invalid>'

(process:92117): GLib-GObject-CRITICAL **: 18:55:43.280: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(process:92117): GLib-GObject-CRITICAL **: 18:55:43.280: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(process:92117): GLib-GObject-WARNING **: 18:55:43.280: cannot register existing type 'SecretBackend'

(process:92117): GLib-GObject-CRITICAL **: 18:55:43.280: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(process:92117): GLib-GObject-CRITICAL **: 18:55:43.280: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(process:92117): GLib-CRITICAL **: 18:55:43.280: g_once_init_leave: assertion 'result != 0' failed

(process:92117): GLib-GObject-CRITICAL **: 18:55:43.280: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

I can add and look up items with secret-tool, so I am not sure what the issue is. My ~/.cargo/config.toml looks like

[registries]
cargo-feeds = { index = "sparse+https://pkgs.dev.azure.com/xxxxxx/Feeds/_packaging/cargo-feeds/Cargo/index/" }

[source.crates-io]
replace-with = "cargo-feeds"

[registry]
global-credential-providers = ["cargo:token", "cargo:libsecret"]

where xxxxxx is my user name.

Any suggestions?

I experience the same problem. Did you find a solution?

No, nothing

Changing the rust version helped.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.