Bad owner or permissions on /home/xxxxx/.ssh/config 问题

今天拉代码不知道之前做了啥操作,一直拉不下来且报如下错误:
./repo/repo init -u ssh://igerrit.storm:29418/Src/iauto-things/manifests -b xxx/master -m default.xml
Get ssh://igerrit.storm:29418/Src/xxxxx/manifests
Bad owner or permissions on /home/xxxxx/.ssh/config
Bad owner or permissions on /home/xxxxx/.ssh/config
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

后来去.ssh/config下查看配置,一看呗清空了,可能是之前拉另外一个项目时候,做了一些操作导致,所以把配置再加上,再去拉代码还是报上面错误:
最后查找解决方法:
The ssh with RHEL 4 is a lot more anal about security checking. In my case, it was the fact that $HOME/.ssh/config was group-writable which was causing it to barf. To fix:

$ cd ~/.ssh
$ chmod 600 *
Note that this error message is kind of stupid, since $HOME/.ssh had permissions 700 on it, and $HOME had 750 permissions on it. If any process managed to evade those permissions, changing the permissions on the config file would be similarly defeated.

如上操作后,可以正常拉代码了

Bad owner or permissions on C:\Users\dell/.ssh/config通常指的是SSH配置文件(config)的权限设置错误或拥有者错误。解决这个问题的方法可以根据以下引用内容进行操作: 方法一:设置.ssh文件的文件权限 1. 打开命令行窗口,并进入用户目录下的.ssh文件夹:cd ~/.ssh 2. 修改config文件的权限为600:chmod 600 config 方法二:修改文件权限 1. 右键点击config文件,选择“属性”。 2. 在安全选项卡中,点击“高级”按钮。 3. 在高级安全设置窗口中,找到用户名并点击“编辑”。 4. 将权限设置为“完全控制”并保存更改 。 方法三:重新生成公钥私钥 1. 删除.ssh文件夹下的config文件,然后重新生成公钥私钥。 2. 打开命令行窗口,并进入用户目录下的.ssh文件夹:cd ~/.ssh 3. 重新生成公钥私钥:ssh-keygen [2] 通过以上方法,你可以尝试解决Bad owner or permissions on C:\Users\dell/.ssh/config问题,并确保VSCode能够正常连接远程服务器。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [[已解决]ssh连接报:Bad owner or permissions on C:\\Users/XXX/.ssh/config](https://blog.csdn.net/m0_57021623/article/details/125202837)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [【ssh】pycharm链接远程服务器出现:Bad owner or permissions on C:\\Users\\用户名/.ssh/config](https://blog.csdn.net/qq_46276946/article/details/131299973)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

kaira88

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

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

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

打赏作者

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

抵扣说明:

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

余额充值