# 密码

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com.cn/help/idea/llms.txt).

> **TL;DR**
> `文件 | 设置 | 外观与行为 | 系统设置 | 密码`  适用于 Windows 和 Linux
>
>
>
> `%instance% | 设置 | 外观与行为 | 系统设置 | 密码`  适用于 macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) !["设置"图标](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.settings.svg)

配置 IntelliJ IDEA 保存版本控制仓库、数据库和其他受保护资源密码的方式。

![密码页面](https://resources.jetbrains.com.cn/help/img/idea/2026.3/settings_passwords.png)

> **Note:**
> IntelliJ IDEA 没有其自己的密码存储。 它使用本地密码管理系统或 KeePass。 如果您的资源凭据发生更改，您必须在相应的密码存储中手动更新它们。 要查看和修改密码，请打开当前使用的密码管理器并检查其中的记录。 例如，这是关于如何在 macOS 的 Keychain Access 应用中执行此操作的官方文档： [https://support.apple.com/en-am/guide/keychain-access/kyca1085/mac](https://support.apple.com/en-am/guide/keychain-access/kyca1085/mac)。

在本地 Keychain
: 请使用原生的钥匙串应用。
:
:
:
: 此选项不适用于 Windows。 macOS 使用钥匙串访问。 对于 Linux，这取决于桌面环境和可用应用程序：如果您同时拥有 GNOME Keyring 和 KWallet，IntelliJ IDEA将使用 GNOME Keyring 以确保兼容性，因为之前版本不支持 KWallet。

在 KeePass
: 请使用 [KeePass](https://keepass.info/) 密码管理器。
:
:
:
: * 数据库 ：指定密码数据库文件的位置 `c.kdbx` 。 若要更改位置，请点击 ![浏览按钮](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.open.svg) 并选择新目录。 要导入另一个 `c.kdbx` 文件，请点击 ![设置菜单](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.settings.svg)并选择 导入 。 要删除 `c.kdbx` 文件中的现有密码，请选择 清除 。 请使用主密码访问密码数据库 `c.kdbx` 。 要为数据库设置主密码，请点击 ![设置菜单](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.settings.svg) 并选择 设置主密码 。 一旦 IntelliJ IDEA 记住您的密码，除非您需要访问密码数据库，否则它将不会再次询问密码，包括主密码。
:
: * 使用 PGP 密钥保护主密码 ：使用 PGP 加密密码数据库的主密码。

不保存，重启后忘记密码
: 不要记住任何密码，并且总是提示输入访问受保护资源的凭据。

> **Warning:**
> （仅限 [数据库工具和 SQL](relational-databases.html) 插件）在   数据源和驱动程序   对话框（ `Shift+Enter` (Windows), `⌘ I` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Shift+Enter` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Eclipse), `⌘ I` (Eclipse (macOS))）中，对于   仅限 URL   连接类型，   URL   字段内容以明文形式存储，并且也会出现在 [IDE 日志文件](troubleshooting-materials.html#locate-ide-log) 和 [数据源设置文件](managing-data-sources.html#locate_the_datasources_xml_file) 中。
>
>
>
> 请使用对话框中指定的   密码   字段提供您的数据库用户密码，而不是将其放入   URL   字段中。

