问题
I'm working with IntelliJ IDEA 13.1.4 and trying to get it to work with Subversion.
My working copies are in the Subversion 1.8 format, and I can commit/update/etc. perfectly with TortoiseSVN 1.8.
When I try to do the same thing in IDEA, it keeps asking for my credentials, even when I check the "Save credentials" box. Even after entering ten times, the dialog keeps popping up. I have to click "Cancel" and can't use Subversion from within IDEA.
I'm trying to connect to a SVN+SSH repository (which, as I mentioned, works when I connect with TortoiseSVN). I can also connect from the SSH terminal in IDEA to the same host.
This has worked for me previously, but after upgrading to Subversion 1.8 and IDEA 13.1.4, this problem arose.
What could be the problem?
回答1:
I faced that problem since IDEA 13.0.1
, now, with 13.1.4
, I find hard for a workaround, I found something that work for me.
Note: I am using linux
and svn 1.7
.
A. I add some parameters to the JVM for IDEA, that parameters can be added in the file:
${IDEA_INSTALL_DIR}/bin/idea64.vmoptions
(in my case, I have 64bits linux, for 32bits it is idea.vmoptions
in the same place)
I add the next JVM parameter at the end of the file:
-Dsvnkit.http.methods=Basic,Digest,NTLM
ref: original reference
B. My linux svn default version is 1.8, I guess that ~/.subversion/* files can have a 1.8 specific format (I will find the answer later :) ), And supposing that, I used another path for svn 1.7 auth and conf files, in my case, ~/.subversion1.7/
.
C. In IntelliJ, I go to subversion settings (Settings->Version Control->Subversion) and setup my paramaters like next image:
Right there, I used the new path for auth files, and the path to the svn 1.7.
D. After all that, I click on the button "Clear Auth Cache".
E. Restart IntelliJ and all works great as used to be in older versions.
.-
I tried every step alone, but didn't work, until I put all together, I got success results.
I hope this can helps someone else, because is a bug/problem with IDEA 13.* and SVN.
Regards. iVieL.
回答2:
I had the same problem on Mac OS X. The issue was that access to the Keychain was disallowed to SVN. To fix this, I just ran a svn update from the command line. This made the svn command to request access to my keychain via a dialog. I chose Always Allow, then IJ could access it as well.
回答3:
I use Windows 7, IDEA 14 and svn 1.8 and got the same problem. But I only need uncheck "Use system default Subversion configuration directory" in the settings of IDEA (without changing the path), "Clear Auth Cache" and restart IDEA. Then the problem not come again.
回答4:
with gnome-keyring
I solved this issue on Arch Linux 4.20.6 using IntelliJ 2018.2 under i3 4.16.1 as the window manager.
- Get
gnome-keyring
:sudo pacman -Sy gnome-keyring
Modify your
.xinitrc
. The following is from the Arch wiki:dbus-update-activation-environment --systemd DISPLAY eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) export SSH_AUTH_SOCK
- Close all your open programs and exit i3:
pkill i3
. - Back in the console,
startx
. Make sure the keyring daemon is running by executingps aux | grep gnome-keyring-daemon
- In order to make
gnome-keyring
store the SVN passwords so IntelliJ can use them, addpassword-stores = gnome-keyring
to~/.subversion/config
. - Start IntelliJ. At some point it will prompt for SVN credentials. Enter them as usual.
- Now,
gnome-keyring
should ask you for a password to create a new keyring:
Next time IntelliJ tries to access the credentials, it will use the keyring and remember the credentials afterwards.
来源:https://stackoverflow.com/questions/25433388/intellij-idea-13-1-keeps-asking-credentials-for-svn