Skip to content

Commit

Permalink
Fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
w4 committed Feb 24, 2024
1 parent b819b91 commit dc1c88d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:1-slim-bookworm AS builder

RUN apt update && apt install -y make
RUN apt update && apt install -y make pkg-config clang

COPY . /sources
WORKDIR /sources
Expand Down
15 changes: 4 additions & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,13 +585,6 @@ impl<U: UserProvider + PackageProvider + Send + Sync + 'static> thrussh::server:

match args.next().as_deref() {
Some("git-upload-pack") => {
// check the executable requested to be ran is the `git-upload-pack` we
// expect. we're not actually going to execute this, but we'll pretend
// to be it instead in `data`.
if args.next().as_deref() != Some("git-upload-pack") {
anyhow::bail!("not git-upload-pack");
}

// parse the requested project from the given path (the argument
// given to `git-upload-pack`)
let arg = args.next();
Expand All @@ -603,10 +596,10 @@ impl<U: UserProvider + PackageProvider + Send + Sync + 'static> thrussh::server:
self.project = Some(Arc::from(project.to_string()));
} else {
session.extended_data(channel, 1, CryptoVec::from_slice(indoc::indoc! {b"
\r\nNo project was given in the path part of the SSH URI. A GitLab group and project should be defined in your .cargo/config.toml as follows:
[registries]
my-project = {{ index = \"ssh://domain.to.registry.com/my-group/my-project\" }}\r\n
"}));
\r\nNo project was given in the path part of the SSH URI. A GitLab group and project should be defined in your .cargo/config.toml as follows:
[registries]
my-project = {{ index = \"ssh://domain.to.registry.com/my-group/my-project\" }}\r\n
"}));
session.close(channel);
}

Expand Down

0 comments on commit dc1c88d

Please sign in to comment.