How to have both arch=amd64 and trusted=yes in sources.list of apt package manager?

What do I want to do?

You can have
deb [trusted=yes] http://pathtoserver/ubuntu bionic main
deb [arch=amd64] http://pathtoserver/ubuntu bionic main

in sources.list separately.

Is there a way I can do
deb [trusted=yes, arch=amd64] http://pathtoserver/ubuntu bionic main or something like that where I can have only amd64 as options and trusted should be yes. in Ubuntu 18.04 Bionic.


Error

If I use the following deb line
deb [arch=amd64 trusted=yes] http://pathtoserver/ubuntu bionic main

E: Conflicting values set for option Trusted regarding source
E: The list of sources could not be read.

This is an airgapped system and I have mirrored the ubuntu repository for offline purpose.


As you saw thanks to @Terrance's comment, you need to put the option like this : [trusted=yes arch=amd64] (in no particular order).

Regarding your second error, it would be because you have another entry that uses the same URL (http://pathtoserver/ubuntu) but does not have the [trusted=yes].

For example, if you have one entry for Releases and one entry for Sources, they both need to have the [trusted=yes].