canonical / canonical/chisel

Logs for `Cannot open credentials directory "/etc/apt/auth.conf.d"` when not using Pro archives

Open
#207 5 comments 0 reactions 0 assignees View on GitHub
Simple
Dominant language
Go
Stars
424
Forks
65
Avg merge
12d 19h
Merged PRs (30d)
1

Description

Minor UX issue.

I wasn't sure what the logs were about at first until noticing the relation to the Pro archives feature. The logs could better communicate that context.

---

Installing chisel into an alpine image:

```bash
docker run --rm -it alpine

export \
TARGETARCH=amd64 \
CHISEL_VERSION=1.1.0 \

CHISEL_RELEASE="https://github.com/canonical/chisel/releases/download/v${CHISEL_VERSION}/chisel_v${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz"

# Install chisel:
wget -qO - "${CHISEL_RELEASE}" | tar -xz --no-same-owner -C /usr/local/bin chisel
```

Install a slice:

```console
$ mkdir /root-fs
$ chisel cut --release ubuntu-24.04 --root /root-fs base-files_base

2025/03/13 02:33:06 Consulting release repository...
2025/03/13 02:33:06 Fetching current ubuntu-24.04 release...
2025/03/13 02:33:06 Processing ubuntu-24.04 release...
2025/03/13 02:33:22 Selecting slices...
2025/03/13 02:33:22 Cannot open credentials directory "/etc/apt/auth.conf.d": open /etc/apt/auth.conf.d: no such file or directory
2025/03/13 02:33:22 Archive "ubuntu-esm-apps" ignored: credentials not found
2025/03/13 02:33:22 Cannot open credentials directory "/etc/apt/auth.conf.d": open /etc/apt/auth.conf.d: no such file or directory
2025/03/13 02:33:22 Archive "ubuntu-esm-infra" ignored: credentials not found
2025/03/13 02:33:22 Fetching ubuntu 24.04 noble suite details...
2025/03/13 02:33:23 Release date: Thu, 25 Apr 2024 15:10:33 UTC
2025/03/13 02:33:23 Fetching index for ubuntu 24.04 noble main component...
2025/03/13 02:33:24 Fetching index for ubuntu 24.04 noble universe component...
2025/03/13 02:33:26 Fetching ubuntu 24.04 noble-security suite details...
2025/03/13 02:33:27 Release date: Wed, 12 Mar 2025 23:28:15 UTC
2025/03/13 02:33:27 Fetching index for ubuntu 24.04 noble-security main component...
2025/03/13 02:33:27 Fetching index for ubuntu 24.04 noble-security universe component...
2025/03/13 02:33:27 Fetching ubuntu 24.04 noble-updates suite details...
2025/03/13 02:33:27 Release date: Thu, 13 Mar 2025 1:23:23 UTC
2025/03/13 02:33:27 Fetching index for ubuntu 24.04 noble-updates main component...
2025/03/13 02:33:28 Fetching index for ubuntu 24.04 noble-updates universe component...
2025/03/13 02:33:28 Fetching pool/main/b/base-files/base-files_13ubuntu10.2_amd64.deb...
2025/03/13 02:33:28 Extracting files from package "base-files"...
```

Should this be a concern that `chisel` assumes it runs within an environment that has `apt` installed? (_**EDIT:** I'm guessing from below chisel only cares about discovering the configs to use itself, hence the ENV configurable_)

> ```
> Cannot open credentials directory "/etc/apt/auth.conf.d": open /etc/apt/auth.conf.d: no such file or directory
> ```

This was not part of the earlier `0.10.0` chisel release. Given the other logs associated to it I assume this is the [`1.1.0` release](https://github.com/canonical/chisel/releases/tag/v1.1.0) introduction of [Pro archives](https://github.com/canonical/chisel#support-for-pro-archives)?:

> ![Image](https://github.com/user-attachments/assets/a99092a5-29ae-4bce-b98a-d2f87aa9afb6)

I see the path is configurable but as I'm not trying to use the Pro archives is there no way to communicate an opt-out?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the output with the documented `chisel cut --release ubuntu-24.04 --root /root-fs base-files_base` command and inspect the Pro archives credential-discovery path. Done means the logs clearly explain that the credential checks concern optional Pro archives and the intended behavior when those credentials are absent is documented or explicitly handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.