Github CLI 身份验证刷新命令未在浏览器中打开

问题描述 投票:0回答:2

我正在尝试使用此命令

`gh auth refresh -h github.com -s codespace`

它工作正常,但是当它说

*"Press Enter to open github.com in your browser"* 

当我这样做时,只需在我的终端中加载 html 内容即可。

例如

Skip to content This is a filler to hide the site header
{{ message }}
... more content here

我尝试导航到它,但没有成功获得添加代码空间的权限。

github wsl-2 github-cli codespaces github-codespaces
2个回答
0
投票

显然,当您从终端获取代码后即可访问。

https://github.com/login/device

参考: https://github.com/cli/cli/issues/2422#issuecomment-1219393463


0
投票

假设你使用linux/wsl

我遇到了同样的问题,我发现 WSL 中有一些实用程序并未随较新版本的 WSL 一起提供。

所以你可能需要安装 wslu,然后当你按 Enter 时,它应该在浏览器中打开它: sudo apt install wslu。

© www.soinside.com 2019 - 2024. All rights reserved.