Unable to register HTTP error (401 - Unauthorized): authorized

Latest response

I'm unable to register new machine RH 8.1.
I can connect to redhat.com via browser, but when I try to register the system I get HTTP error:

[root@m64 ~]# subscription-manager  register 
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: name@company.cz
HTTP error (401 - Unauthorized): authorized

This is rhsm.log:

tail /var/log/rhsm/rhsm.log
    return self.conn.request_get(method)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 726, in request_get
    return self._request("GET", method, headers=headers)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 752, in _request
    info=info, headers=headers)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 627, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 689, in validateResponse
    raise RestlibException(response['status'], error_msg, response.get('headers'))
rhsm.connection.RestlibException: HTTP error (401 - Unauthorized): authorized

Thank you for your help.


Getting the same error on RH 7.4, can anyone explain this?

I get the the same error like Petr on my x86_64 VM. It looks like something wrong on Red Hat Side. :( I will wait until Monday and check it again. Hope than it works

Same error/log entry here with RHEL 8.1 x86_64 also on a VM. Tried rebuilding and even tried different host/ISP. Guess like Dirk said, maybe have to wait until Monday...

We are observing the same problem, RHEL8.1

I also have the same proble. RHEL8.1

Problem got solved by: "Register the system using Red Hat Login ID as the username instead of using email address:" https://access.redhat.com/solutions/4173071

Sorry, not solved for me. I have got another error message only:

HTTP error (401 - Unauthorized): Ungültige Benutzer-Anmeldeinformationen

Username does now work for me either, but there is one more workaround: create an activation key and use it instead of username/password like this:

    subscription-manager register --org=<org-id> --activationkey=<activation-key-name>


EDIT: the subscription-manager orgs part of the above solution will not work in this case. I had to login to Customer portal and retrieve org ID and activation key ID from there.

Apparently there is a server side problem which breaks --user ... --password authentication for all subscription-manager commands.

Hello, this solved for me ! many thanks !

Thank-you Egor, that worked when nothing else would. I was trying to register a new RHEL Hyper-V client on my work desktop to my RH Developer subscription. Definitely used username in the past. But after creating an Activation Key in my RH Developer account was able to register.

As you have said, it has worked for me thanks a lot!

This worked for me. I could not use my account email address. Go to the Customer Portal, open your profile, your Username is the field you are looking for. Then register using Username/Password... Worked perfectly added the system/installed product in the subscription. Thank you.

Worked for me! Thx

Thank you. Using my login ID instead of my email worked.

Thanks Xiaoguang!

Solved, for me at least

Sorry, this is no solution for me.

subscription-manager orgs --user= --password=

I will get the response: "authorized"

not real org_id

Petr, I had to create activation key on Redhat customer portal, I also got org ID from there.

If command-line authentication with --user ... --password is broken, it won't work for any of the subscription-manager commands ;) That looks like a server-side problem to me.

Thanks for finding that - I updated my reply.

For me solution with using activation token instead of user/password has helped. https://access.redhat.com/solutions/3341191 https://access.redhat.com/articles/1378093

subscription-manager register --username= enterusername NOT your email --password=****** --auto-attach this one works for me when i enter my username but, doesn't work if you enter email address. :) Thanks all

Thank you, now it works perfectly :-)

If you previously gave email as username. And now trying correctly with Red Hat Login ID as the username instead of using email address but not working for you. Then try clearing the cache first -

subscription-manager clean subscription-manager register subscription-manager attach --auto


Also, make sure your passwd doesn't have any special symbols or spaces. If so, change it first and then try again. https://access.redhat.com/solutions/4308451

I used the "-" character in my password and that was the issue. Changing my password fixed it.

OK! Solved.

Than you


Also try to avoid !-sign in passwords, these are considered escape to command line characters.


Jan Gerrit Kootstra