Java 在 Intellij IDEA 14 上更改远程存储库凭据(身份验证)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28142361/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Change remote repository credentials (authentication) on Intellij IDEA 14
提问by Momo
I recently changed my Bitbucket password for security reasons. However, IntelliJ didn't update my repository to the new credentials, so it stops me from pulling/pushing anything to my repository. I am not using any plugins for this, just the integrated VCS operations inside the IDE.
出于安全原因,我最近更改了我的 Bitbucket 密码。但是,IntelliJ 没有将我的存储库更新为新凭据,因此它阻止我将任何内容拉入/推送到我的存储库。我没有为此使用任何插件,只是在 IDE 中使用了集成的 VCS 操作。
Every time I pull/push, this pops out:
每次我拉/推时,都会弹出:
fatal: Authentication failed for 'https://momothereal:[email protected]/team/repo.git/
致命:' https://momothereal:[email protected]/team/repo.git/ 的身份验证失败
Where xxxxxxxxxxxxis my old password. I think changing this remote address with the correct password would fix it, though I cannot find where to do so.
其中xxxxxxxxxxxx是我的旧密码。我认为用正确的密码更改这个远程地址可以解决这个问题,但我找不到在哪里这样做。
采纳答案by MozenRath
The easiest of all the above ways is to:
以上所有方法中最简单的方法是:
- Go to Settings>>Appearance & Behavior>>System Settings>>Passwords
- Change the setting to not store passwords at all
- Invalidate and restart IntelliJ
- Go to Settings>>Version Control>>Git>>SSH executable: Build-in
- Do a fetch/pull operation
- Enter the password when prompted
- Again go to Settings>>Appearance & Behavior>>System Settings>>Passwords
- This time select store passwords on disk(protected with master password)
- 转到设置>>外观和行为>>系统设置>>密码
- 将设置更改为根本不存储密码
- 使 IntelliJ 无效并重新启动
- 转到设置>>版本控制>>Git>>SSH可执行文件:内置
- 执行取/拉操作
- 出现提示时输入密码
- 再次转到设置>>外观和行为>>系统设置>>密码
- 这次选择在磁盘上存储密码(受主密码保护)
Voila!
瞧!
Note that this will not work if your password is in your URL itself. If that is the case then you need to follow the steps given by @moleksyuk here
请注意,如果您的密码在您的 URL 中,这将不起作用。如果是这种情况,那么您需要按照@moleksyuk此处给出的步骤进行操作
You also choose to use the credentials helper option in IntelliJ to achieve similar functionality as suggested by Ramesh here
你也可以选择使用的凭据帮手的IntelliJ选项来实现类似的功能由拉梅什提出这里
回答by sy677
This worked for me on Intellij 12:
这在 Intellij 12 上对我有用:
Open settings -> passwords, select "Do not remember passwords" and apply/ok.
打开设置->密码,选择“不要记住密码”并应用/确定。
Do your VCS fetch/update/push/whatever and it should ask you for a password.
做你的VCS fetch/update/push/whatever,它应该要求你输入密码。
Check remember password and OK, it should do the VCS thing correctly.
检查记住密码,好的,它应该正确地做 VCS 的事情。
Go back to settings -> passwords and switch it back to "Remember on disk", then apply/ok.
返回设置 -> 密码并将其切换回“记住磁盘”,然后应用/确定。
回答by moleksyuk
- Go to [project]/.git directory.
- Open for edit 'config' file.
- In '[remote "origin"]' section find 'url' property and replace your old password with new one.
- Press Ctrl+T in Intellij IDEA to update project.
- 转到 [project]/.git 目录。
- 打开以编辑“配置”文件。
- 在 '[remote "origin"]' 部分找到 'url' 属性并用新密码替换旧密码。
- 在 Intellij IDEA 中按 Ctrl+T 更新项目。
回答by Idan Magled
I needed to change my user name and password in Intellij Did it by
我需要在 Intellij 中更改我的用户名和密码
preferences -> version control -> GitHub
首选项 -> 版本控制 -> GitHub
There you can change user name and password.
在那里您可以更改用户名和密码。
回答by C. Natesh
In Intellinj IDEA 14, we can change the Git password by the following steps:
在 Intellinj IDEA 14 中,我们可以通过以下步骤更改 Git 密码:
From the menu bar :
从菜单栏:
Select File -> Settings -> Appearance & Behavior -> System Settings .
Choose Passwords.
Click the 'Master Password' under 'Disk storage protection'.
In the Password field, enter your
old password
. Enter yournew password
in the subsequent fields.Now the master password will be changed.
选择文件 -> 设置 -> 外观和行为 -> 系统设置。
选择密码。
单击“磁盘存储保护”下的“主密码”。
在密码字段中,输入您的
old password
.new password
在随后的字段中输入您的。现在主密码将被更改。
回答by w01ff
For Mac users this could also be helpful:
对于 Mac 用户,这也有帮助:
Credentials are stored in Keychain Access.app. You can just change them there.
凭据存储在Keychain Access.app 中。你可以在那里改变它们。
回答by Pankaj Chauhan
IN Android Studio 2.3
在 Android Studio 2.3 中
- Open Setting (CTRL+ALT+S)
- Select Other Settings (at the end)
- select Bitbucket
- 打开设置 (CTRL+ALT+S)
- 选择其他设置(最后)
- 选择比特桶
Here you can change your new Password or User
在这里您可以更改您的新密码或用户
回答by M Singh Karnawat
For Mac User Please Go to As Below:
Mac 用户请转至如下:
(First of all you must have installed bitbucket plugin)
(首先你必须安装了bitbucket插件)
Android Studio -> Preference -> Other Settings -> Bitbucket
Android Studio -> 首选项 -> 其他设置 -> Bitbucket
Now change your password and click on Test for verify it. Will also able to add SSH Key for login.
现在更改您的密码并单击测试进行验证。还可以添加用于登录的 SSH 密钥。
Also its depend on which plugin you used. Some have direct like
也取决于您使用的插件。有些有直接喜欢
Android Studio -> Preference -> Bitbucket linky
Android Studio -> Preference -> Bitbucket linky