Setting your timeout period for Codespaces

You can set your default timeout for Codespaces in your personal settings page.

代码空间可用于使用 GitHub Team 或 GitHub Enterprise Cloud 的组织。 更多信息请参阅“GitHub 的产品”。

A codespace will stop running after a period of inactivity. You can specify the length of this timeout period. The updated setting will apply to any newly created codespace.

Warning: Codespaces are billed per minute. If you are not actively using a codespace but the codespace has not yet timed out, you are still billed for the time that the codespace is running. For more information, see "About billing for Codespaces."

Setting your default timeout

  1. 在任何页面的右上角,单击您的个人资料照片,然后单击 Settings(设置)用户栏中的 Settings 图标
  2. 在左侧边栏中,单击 Codespaces用户设置侧边栏中的 Codespaces 选项卡
  3. Under "Default idle timeout", enter the time that you want, then click Save. The time must be between 5 minutes and 240 minutes (4 hours). Selecting your timeout

Setting your timeout period

要了解有关 GitHub CLI 的更多信息,请参阅“关于 GitHub CLI”。

To set the timeout period when you create a codespace, use the idle-timeout argument with the codespace create subcommand. Specify the time in minutes, followed by m. The time must be between 5 minutes and 240 minutes (4 hours).

gh codespace create --idle-timeout 90m

If you don't specify a timeout period when you create a codespace, then the default timeout period will be used. For information about setting a default timeout period, click the "Web browser" tab on this page. You can't currently specify a default timeout period through GitHub CLI.




所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。


或者, 了解如何参与。