【vscode】远程云主机的报错

在新电脑上,VSCode的远程连接出现错误'Install terminal quit with output: 过程试图写入的管道不存在'。问题归因于权限不足和可能的inotify限制。通过修改文件权限,确保当前用户对私钥文件有完全控制权,并调整inotify的用户实例和观察限制,问题得到解决。需运行sudo sysctl命令临时更新限制,并在/etc/sysctl.conf中设置以持久化更改。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  • win11

  • 之前在另一台电脑上的vscode是可以的

  • 新电脑拷贝了vs的配置,但是远程不行了。

Install terminal quit with output: 过程试图写入的管道不存在。

  • 发现连接不到远程
  • 以为是konw hosts 的问题,

在这里插入图片描述

  • 删除了要访问ip的内容,还是不行,报错:

it is required that your private key files are not accessible by others

  • 看了下文件的权限
  • 里面四个用户,我都设置了 完全控制,看起来还是报错,没权限

找到使用vscode的当前用户

在这里插入图片描述

  • 必须powershell

  • 找到indentify文件:

发现zhangbin不在四个用户里面

在这里插入图片描述

还需要做一个配置更改

  • You can check the current inotify user instance limit, with the following:
cat /proc/sys/fs/inotify/max_user_instances

Similarly, the current inotify user watch limit can be checked as follows:

cat /proc/sys/fs/inotify/max_user_watches

Update the limits
You can update the limits temporarily, with the following commands (setting the values to 8192 and 524288 respectively in this example):

sudo sysctl fs.inotify.max_user_instances=8192
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p

In order to make the changes permanent, i.e. to persist a reboot, you can set fs.inotify.max_user_instances=8192 and fs.inotify.max_user_watches=524288 in the file /etc/sysctl.conf.

After updating the limits, you can validate these on the host again, as above, with cat /proc/sys/fs/inotify/max_user_instances and cat /proc/sys/fs/inotify/max_user_watches.

To check the value as reflected in a running container, exec into the container and cat the files:

docker exec -it <CONTAINER ID> cat /proc/sys/fs/inotify/max_user_instances

and

docker exec -it <CONTAINER ID> cat /proc/sys/fs/inotify/max_user_watches

If the updated limits are not reflected on a host after running sysctl -p, reboot the host after setting the limits in /etc/sysctl.conf.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

等风来不如迎风去

你的鼓励是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值