Merge pull request #24718 from geekpi/translating

translated
This commit is contained in:
geekpi 2022-02-15 09:18:59 +08:00 committed by GitHub
commit 885f3ecf83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 107 additions and 107 deletions

View File

@ -1,107 +0,0 @@
[#]: subject: "Troubleshooting “Unacceptable TLS certificate” Error in Linux"
[#]: via: "https://itsfoss.com/unacceptable-tls-certificate-error-linux/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Troubleshooting “Unacceptable TLS certificate” Error in Linux
======
When it comes to SSL/TLS certificates, you may come across a variety of issues, some related to the browser or a problem in a websites back-end.
One such error is “Unacceptable TLS certificate” in Linux.
Unfortunately, theres no “one-solves-it-all answer to this. However, there are some potential solutions that you can try, and here, I plan to highlight those for you.
### When do you encounter this TLS Certificate issue?
![][1]
In my case, I noticed the issue when adding the Flathub repository via the terminal, a step that lets you access the massive collection of Flatpaks when [setting up Flatpak][2].
However, you can also expect to encounter this error when installing a Flatpak app or using a Flatpak ref file from a third-party repository via the terminal.
Some users noticed this issue when using their organizations recommended VPN service for work on Linux.
So, how do you fix it? Why is this a problem?
Well, technically, its either of two things:
* Your system does not accept the certificate (and tells that its invalid).
* The certificate does not match the domain the user connects to.
If its the second, you will have to reach out to the websites administrator and fix it from their end.
But if its the first, you have a couple of ways to deal with it.
### 1\. Fix “Unacceptable TLS certificate” when using Flatpak or adding GNOME Online Accounts
If you are trying to add Flathub remote or a new Flatpak application and notice the error in the terminal, you can simply type in:
```
sudo apt install --reinstall ca-certificates
```
This should re-install the trusted CA certificates, in case there has been an issue with the list in some way.
![][3]
In my case, when trying to add the Flathub repository, I encountered the error, which was resolved by typing the above command in the terminal.
So, I think that any Flatpak-related issues with TLS certificates can be fixed using this method.
### 2\. Fix “Unacceptable TLS certificate” when using Work VPN
If you are using your organizations VPN to access materials related to work, you might have to add the certificate to the list of trusted CAs in your Linux distro.
Do note that you need the VPN service or your organizations administrator to share the .CRT version of the root certificate to get started.
Next, you will need to navigate your way to **/usr/local/share/ca-certificates** directory.
You can create a directory under it and use any name to identify your organizations certificate. And, then add the .CRT file to that directory.
For instance, its usr/local/share/ca-certificates/organization/xyz.crt
Do note that you need root privileges to add certificates or make a directory under the **ca-certificates** directory.
Once you have added the necessary certificate, all you have to do is update the certificate support list by typing in:
```
sudo update-ca-certificates
```
And, the certificate should be treated valid by your system whenever you try to connect to your companys VPN.
### Wrapping Up
An unacceptable TLS certificate is not a common error, but you can find it in various use cases, such as connecting to GNOME Online accounts.
If the error cannot be resolved by two of these methods, it is possible that the domain/service you are connecting to has a configuration error. In that case, you will have to contact them to fix the issue.
Have you faced this error anytime? How did you fix it? Are you aware of other solutions to this problem (potentially, something thats easy to follow)? Let me know your thoughts in the comments below.
--------------------------------------------------------------------------------
via: https://itsfoss.com/unacceptable-tls-certificate-error-linux/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/unacceptable-tls-certificate.png?resize=800%2C450&ssl=1
[2]: https://itsfoss.com/flatpak-guide/
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/tls-certificate-troubleshoot.png?resize=800%2C506&ssl=1

View File

@ -0,0 +1,107 @@
[#]: subject: "Troubleshooting “Unacceptable TLS certificate” Error in Linux"
[#]: via: "https://itsfoss.com/unacceptable-tls-certificate-error-linux/"
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
[#]: collector: "lujun9972"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
在 Linux 中解决 “Unacceptable TLS certificate” 的问题
======
当涉及到 SSL/TLS 证书时,你可能会遇到各种问题,有些与浏览器有关,有些则是网站后台的问题。
其中一个错误是 Linux 中的 “Unacceptable TLS certificate”。
不幸的是,对此没有“一劳永逸”的答案。然而,有一些潜在的解决方案,你可以尝试,在此,我打算为你强调这些。
### 你什么时候会遇到这个 TLS 证书问题?
![][1]
在我的例子中,我是在通过终端添加 Flathub 仓库时注意到这个问题的,这个步骤可以让你在[设置 Flatpak][2] 时访问大量的 Flatpaks 的集合。
然而,在安装 Flatpak 应用或通过终端使用来自第三方仓库的 Flatpak 参考文件时,你也可能会遇到这个错误。
一些用户在 Linux 上使用他们组织推荐的 VPN 服务工作时注意到这个问题。
那么,如何解决这个问题呢?为什么这是一个问题?
嗯,从技术上讲,这是两件事中的一个:
* 你的系统不接受该证书(并告诉它是无效的)。
* 该证书与用户连接的域不匹配。
如果是第二种情况,你将不得不联系网站的管理员,从他们那里解决这个问题。
但是,如果是第一种情况,你有几种方法来处理它。
### 1\. 在使用 Flatpak 或添加 GNOME 在线账户时修复 “Unacceptable TLS certificate”
如果你试图添加 Flathub 远程或一个新的 Flatpak 应用,并在终端中注意到这个错误,你可以简单地输入:
```
sudo apt install --reinstall ca-certificates
```
这应该会重新安装受信任的 CA 证书,以防止列表中出现某种问题。
![][3]
在我的例子中,当试图添加 Flathub 仓库时,我遇到了错误,通过在终端输入上述命令解决了这个问题。
所以,我认为任何与 Flatpak 有关的 TLS 证书问题都可以用这个方法解决。
### 2\. 在使用工作 VPN 时修复 “Unacceptable TLS certificate”
如果你使用你的组织的 VPN 来访问与工作有关的材料,你可能要把证书添加到你的 Linux 发行版中的可信 CA 列表中。
请注意,你需要 VPN 服务或你组织的管理员分享根证书的 .CRT 版本,才能开始使用。
接下来,你将需要进入 **/usr/local/share/ca-certificates** 目录。
你可以下面创建一个目录,并使用任何名称来标识你组织的证书。然后,将 .CRT 文件添加到该目录。
例如,它是 /usr/local/share/ca-certificates/organization/xyz.crt
请注意,你需要有 root 权限来添加证书或在 **ca-certificates** 目录下创建目录。
当你添加了必要的证书,你所要做的就是输入以下命令更新证书支持列表:
```
sudo update-ca-certificates
```
而且,每当你试图连接到你公司的 VPN 时,你的系统应将该证书视为有效。
### 总结
不可接受的 TLS 证书并不是一个常见的错误,但你可以在各种使用情况下发现它,比如连接到 GNOME 在线账户。
如果上述两种方法都不能解决这个错误,那么你所连接的域/服务有可能存在配置错误。在这种情况下,你将不得不联系他们来解决这个问题。
你是否遇到过这个错误?你是如何解决的?你是否知道这个问题的其他解决方案(有可能是容易操作的)?请在下面的评论中告诉我你的想法。
--------------------------------------------------------------------------------
via: https://itsfoss.com/unacceptable-tls-certificate-error-linux/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/unacceptable-tls-certificate.png?resize=800%2C450&ssl=1
[2]: https://itsfoss.com/flatpak-guide/
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/tls-certificate-troubleshoot.png?resize=800%2C506&ssl=1