diff --git a/Cargo.lock b/Cargo.lock index 5d64e37a2..70b44bc17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "rustwide" version = "0.14.0" -source = "git+https://github.com/l4l/rustwide.git?branch=registry-key#f6d918ac3179d85fb64788bf30eb4bc2ba35d738" +source = "git+https://github.com/l4l/rustwide.git?branch=registry-key#bd25fcf067ad47c42bc2431a83a4306de005f85a" dependencies = [ "attohttpc", "base64 0.13.0", diff --git a/src/docbuilder/rustwide_builder.rs b/src/docbuilder/rustwide_builder.rs index 4c95dd4ce..352595c7e 100644 --- a/src/docbuilder/rustwide_builder.rs +++ b/src/docbuilder/rustwide_builder.rs @@ -18,7 +18,7 @@ use postgres::Client; use rustwide::cmd::{Command, CommandError, SandboxBuilder, SandboxImage}; use rustwide::logging::{self, LogStorage}; use rustwide::toolchain::ToolchainError; -use rustwide::{Build, Crate, Toolchain, Workspace, WorkspaceBuilder}; +use rustwide::{AlternativeRegistry, Build, Crate, Toolchain, Workspace, WorkspaceBuilder}; use serde_json::Value; use std::collections::{HashMap, HashSet}; use std::path::Path; @@ -297,7 +297,13 @@ impl RustwideBuilder { let krate = match kind { PackageKind::Local(path) => Crate::local(path), PackageKind::CratesIo => Crate::crates_io(name, version), - PackageKind::Registry { url, key } => Crate::registry(url, name, version, key), + PackageKind::Registry { url, key } => { + let mut registry = AlternativeRegistry::new(url); + if let Some(key) = key { + registry.authenticate_with_ssh_key(key); + } + Crate::registry(registry, name, version) + } }; krate.fetch(&self.workspace)?;