Cannot create apt repository

Problem:
I’ve just installed foreman+katello, I’m trying to add a new apt repository, but I’m receiving this error:

Could not create the repository:
  undefined method `upstream_authentication_token_changed?' for #<Katello::RootRepository:0x0000000017e355c8>
  Did you mean?  upstream_authentication_token
                 upstream_authentication_token_in_db

This happens from both gui and hammer-cli

Expected outcome:

Foreman and Proxy versions:

foreman-3.0.1-1
foreman-proxy-3.0.1-1
katello-4.2.1-1

Foreman and Proxy plugin versions:

hammer (3.0.0)

  • hammer_cli_foreman (3.0.0)
  • hammer_cli_foreman_puppet (0.0.3)
  • hammer_cli_foreman_remote_execution (unknown version)
  • hammer_cli_foreman_tasks (unknown version)
  • hammer_cli_katello (1.1.2)

Distribution and version:

CentOS Linux release 7.9.2009 (Core)
NAME=“CentOS Linux”
VERSION=“7 (Core)”
ID=“centos”
ID_LIKE=“rhel fedora”
VERSION_ID=“7”
PRETTY_NAME=“CentOS Linux 7 (Core)”
ANSI_COLOR=“0;31”
CPE_NAME=“cpe:/o:centos:centos:7”
HOME_URL=“https://www.centos.org/
BUG_REPORT_URL=“https://bugs.centos.org/

CENTOS_MANTISBT_PROJECT=“CentOS-7”
CENTOS_MANTISBT_PROJECT_VERSION=“7”
REDHAT_SUPPORT_PRODUCT=“centos”
REDHAT_SUPPORT_PRODUCT_VERSION=“7”

CentOS Linux release 7.9.2009 (Core)
CentOS Linux release 7.9.2009 (Core)

Other relevant data:

Pastebin.com

Not sure if that is the reason for this problem, but I saw the following in your pastebin: "deb_architectures"=>"x86_64".

I am guessing you set Architectures: x86_64 on the repo page. This will not work, since it should be Architectures: amd64 for APT repos.

I’ve tried a lot of combinations, also put a random token. But I’ve got always the same error

AFAIK upstream_authentication_token is currently only supported/processed for yum-repositories, but it should not hurt deb-repositories.
It was added here:
https://projects.theforeman.org/issues/32660

@Justin_Sherrill, @jjeffers any idea?

Hi,
any news about this problem?

I have the same issue by creating yum repository :frowning:

I guess, if you have the same error on yum, that this issue is not specific to apt.

Do you have the latest db state and run foreman-rake db:migrate / foreman-installer udpate process ?

1 Like

After these two commands my issue solved! Thanks @Bernhard_Suttner

1 Like