Skip to content

Fix Conflicting keyring values in app-vscode.sh #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neidiom
Copy link
Contributor

@neidiom neidiom commented Jul 21, 2025

I was getting this error:

wget -qO- https://omakub.org/install | bash
________ __ .
_
_ \ _____ _____ | | ____ _ |_
/ | \ / __ \ | |/ / | \ __
/ | \ Y Y / __ | <| | / _\
_______ /|| (___ /|_ _/| /
/ / / / /

=> Omakub is for fresh Ubuntu 24.04+ installations only!

Begin installation (or abort with ctrl+c)...
E: Conflicting values set for option Signed-By regarding source https://packages.microsoft.com/repos/code/ stable: /etc/apt/keyrings/packages.microsoft.gpg != /usr/share/keyrings/microsoft.gpg E: The list of sources could not be read.

The Problem I Faced

When I first tried to run the installation, I immediately ran into a problem that had a conflict in the software sources. The repository for Microsoft VS Code was defined in more than one place, and these definitions were secured with two different, conflicting GPG keys. This created a deadlock; apt would refuse to do anything until the conflict was resolved, which in turn caused the installation script to fail right at the start.

@Kasui92
Copy link
Contributor

Kasui92 commented Jul 21, 2025

From what I understand, the problem occurs if the Microsoft VS Code repository has already been added to the APT sources and the VS Code installation script for Omakub is run. By not performing an existence check, you simply add another layer, creating a conflict.

At this point, wouldn't it be enough to simply implement a check in the part where the repository is added that bypasses and switches to the VSCode installation if already present?

This way, we avoid having to clean up and re-add it every time.

@neidiom
Copy link
Contributor Author

neidiom commented Jul 21, 2025

I have taken a more gentle approach.

@Kasui92
Copy link
Contributor

Kasui92 commented Jul 22, 2025

@neidiom
IMO, the script generates too much noise (due to comments, both printed to the terminal and in the script) and performs unnecessary checks/steps.

It's sufficient an initial check that only verifies whether the GPG keys and Microsoft repo have already been added. If so, it continues with the VSCode installation from APT; otherwise, it adds the mirrors first and then continues.

This allows for much less clutter and keeps the code clean.

@neidiom
Copy link
Contributor Author

neidiom commented Jul 24, 2025

@Kasui92 please check now. I wrapped the repo setup part into a function.

Copy link
Contributor

@Kasui92 Kasui92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly! It all seems correct to me 👍🏻

@neidiom neidiom changed the title Update app-vscode.sh Fix Conflicting keyring values in app-vscode.sh Jul 25, 2025
@Kasui92
Copy link
Contributor

Kasui92 commented Aug 3, 2025

This PR closes #521

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants