---
name: Registry-ts_login_expire
title: Why does the Container Registry login keep expiring?
description: Logging in to IBM Cloud&reg; Container Registry by using the `ibmcloud cr login` command is subject to Cloud Identity and Access Management (IAM) login session limits.
last-updated: 2026-04-15
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/Registry?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Why does the Container Registry login keep expiring?
{: #troubleshoot-login-expire}
{: troubleshoot}
{: support}

Logging in to IBM Cloud&reg; Container Registry by using the [`ibmcloud cr login`](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregcli&format=markdown#bx_cr_login) command is subject to Cloud Identity and Access Management (IAM) login session limits.
{: shortdesc}

Pushes and pulls to the registry fail after a period of inactivity. The following example is a typical scenario:
{: tsSymptoms}

1. You log in by using the `ibmcloud cr login` command, and then you push or pull an image.
2. You don't run any other commands for a length of time that is longer than the IAM session inactivity limit.
3. Without logging in again, you try to push or pull an image and the command fails.

When you log in by using the `ibmcloud cr login` command, you are subject to the IAM session limits, see [Setting limits for login sessions](https://cloud.ibm.com/docs/iam?topic=iam-iam-work-sessions&interface=ui&format=markdown).
{: tsCauses}

You can mitigate the issue by taking one of the following actions:
{: tsResolve}

- Log in by using an IAM [API key](#x8051010){: term} because this key is not subject to the IAM session expiry, see [Using Docker to authenticate with an API key](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_access&format=markdown#registry_access_apikey_auth_docker).
- Change the IAM login session limits to better suit your needs, see [Setting limits for login sessions](https://cloud.ibm.com/docs/iam?topic=iam-iam-work-sessions&interface=ui&format=markdown). The longer you set the limits, the longer your Container Registry login lasts for.