Unable to remember subversion login credentials

Answered

As the subject says having a problem with IDEA ultimate 2019.1 remembering VCS credentials. every time I restart IDEA it doesn't automatically check for changes anymore. When I manually goto the incoming changes tab and hit refresh I'm always prompted for my users password twice in quick succession. I'm ticking remember password, but nothing is being remembered? twice because I've got two sub-modules? enter same username/password twice for both prompts.

This is on CentOS 7.6, subversion 1.7.14 (distro base version), passwords in settings is set to native keyring, but when I open the password app in gnome, I don't see an IDEA keyring? don't see any passwords in there at all?

Tried wiping the subversion auth cache, didn't help at all.

In the idea.log there are some stacktraces on IDE startup:

2019-07-22 11:10:34,756 [  41847]   INFO - j.ide.ui.OptionsTopHitProvider - 849 ms spent on EDT to cache options in project
2019-07-22 11:10:37,566 [ 44657] INFO - ommitted.CommittedChangesCache - FINISHED CommittedChangesCache.getProjectChangesAsync - execution in queue
2019-07-22 11:10:47,878 [ 54969] INFO - ins.idea.svn.IdeaSVNConfigFile - Could not load /etc/subversion/servers
java.io.FileNotFoundException: /etc/subversion/servers (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at java.net.URL.openStream(URL.java:1045)
at org.ini4j.spi.IniSource.<init>(IniSource.java:54)
at org.ini4j.spi.AbstractParser.newIniSource(AbstractParser.java:68)
at org.ini4j.spi.IniParser.parse(IniParser.java:64)
at org.ini4j.Ini.load(Ini.java:110)
at org.ini4j.Ini.load(Ini.java:106)
at org.jetbrains.idea.svn.IdeaSVNConfigFile.updateGroups(IdeaSVNConfigFile.kt:62)
at org.jetbrains.idea.svn.IdeaSVNConfigFile.updateGroups$default(IdeaSVNConfigFile.kt:56)
at org.jetbrains.idea.svn.IdeaSVNConfigFile.getConfigFile(IdeaSVNConfigFile.kt:40)
at org.jetbrains.idea.svn.IdeaSVNConfigFile.getValues(IdeaSVNConfigFile.kt:78)
at org.jetbrains.idea.svn.IdeaSVNConfigFile$Companion.getValues(IdeaSVNConfigFile.kt:201)
at org.jetbrains.idea.svn.IdeaSVNConfigFile$Companion.getPropertyIdea(IdeaSVNConfigFile.kt:142)
at org.jetbrains.idea.svn.IdeaSVNConfigFile.getPropertyIdea(IdeaSVNConfigFile.kt)
at org.jetbrains.idea.svn.auth.SvnAuthenticationManager$HostOptions.isAuthStorageEnabled(SvnAuthenticationManager.java:151)
at org.jetbrains.idea.svn.auth.SvnInteractiveAuthenticationProvider.requestClientAuthentication(SvnInteractiveAuthenticationProvider.java:61)
at org.jetbrains.idea.svn.auth.AuthenticationService.lambda$requestCredentials$0(AuthenticationService.java:78)
at org.jetbrains.idea.svn.auth.AuthenticationService.requestCredentials(AuthenticationService.java:106)
at org.jetbrains.idea.svn.auth.AuthenticationService.requestCredentials(AuthenticationService.java:77)
at org.jetbrains.idea.svn.commandLine.UsernamePasswordCallback.getCredentials(UsernamePasswordCallback.java:53)
at org.jetbrains.idea.svn.commandLine.CommandRuntime.handleErrorText(CommandRuntime.java:136)
at org.jetbrains.idea.svn.commandLine.CommandRuntime.onAfterCommand(CommandRuntime.java:96)
at org.jetbrains.idea.svn.commandLine.CommandRuntime.runWithAuthenticationAttempt(CommandRuntime.java:55)
at org.jetbrains.idea.svn.api.BaseSvnClient.execute(BaseSvnClient.java:122)
at org.jetbrains.idea.svn.api.BaseSvnClient.execute(BaseSvnClient.java:109)
at org.jetbrains.idea.svn.api.BaseSvnClient.execute(BaseSvnClient.java:95)
at org.jetbrains.idea.svn.info.CmdInfoClient.doInfo(CmdInfoClient.kt:103)
at org.jetbrains.idea.svn.SvnVcs.getInfo(SvnVcs.java:548)
at org.jetbrains.idea.svn.SvnVcs.getInfo(SvnVcs.java:553)
at org.jetbrains.idea.svn.SvnUtil.getRepositoryRoot(SvnUtil.java:405)
at org.jetbrains.idea.svn.history.SvnCommittedChangesProvider.getRepositoryRoot(SvnCommittedChangesProvider.java:163)
at org.jetbrains.idea.svn.history.SvnCommittedChangesProvider.getCommittedChanges(SvnCommittedChangesProvider.java:132)
at com.intellij.openapi.vcs.changes.committed.CommittedChangesCache.refreshCache(CommittedChangesCache.java:527)
at com.intellij.openapi.vcs.changes.committed.CommittedChangesCache.lambda$refreshCacheAsync$19(CommittedChangesCache.java:945)
at com.intellij.openapi.vcs.changes.committed.CommittedChangesCache.refreshCacheAsync(CommittedChangesCache.java:966)
at com.intellij.openapi.vcs.changes.committed.CommittedChangesCache.lambda$refreshAllCachesAsync$18(CommittedChangesCache.java:910)
at com.intellij.vcs.ProgressManagerQueue$MyWorker.run(ProgressManagerQueue.java:116)
at com.intellij.vcs.ProgressManagerQueue$1.run(ProgressManagerQueue.java:50)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:731)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:403)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2019-07-22 11:10:47,884 [ 54975] INFO - ins.idea.svn.IdeaSVNConfigFile - Could not load /etc/subversion/config
java.io.FileNotFoundException: /etc/subversion/config (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at java.net.URL.openStream(URL.java:1045)
at org.ini4j.spi.IniSource.<init>(IniSource.java:54)
at org.ini4j.spi.AbstractParser.newIniSource(AbstractParser.java:68)
at org.ini4j.spi.IniParser.parse(IniParser.java:64)
at org.ini4j.Ini.load(Ini.java:110)
at org.ini4j.Ini.load(Ini.java:106)
at org.jetbrains.idea.svn.IdeaSVNConfigFile.updateGroups(IdeaSVNConfigFile.kt:62)
at org.jetbrains.idea.svn.IdeaSVNConfigFile.updateGroups$default(IdeaSVNConfigFile.kt:56)
at org.jetbrains.idea.svn.IdeaSVNConfigFile.getConfigFile(IdeaSVNConfigFile.kt:40)
at org.jetbrains.idea.svn.IdeaSVNConfigFile.getValue(IdeaSVNConfigFile.kt:77)
at org.jetbrains.idea.svn.IdeaSVNConfigFile$Companion.getValue(IdeaSVNConfigFile.kt:197)
at org.jetbrains.idea.svn.IdeaSVNConfigFile.getValue(IdeaSVNConfigFile.kt)
at org.jetbrains.idea.svn.auth.SvnAuthenticationManager$HostOptions.isAuthStorageEnabled(SvnAuthenticationManager.java:153)
at org.jetbrains.idea.svn.auth.SvnInteractiveAuthenticationProvider.requestClientAuthentication(SvnInteractiveAuthenticationProvider.java:61)
at org.jetbrains.idea.svn.auth.AuthenticationService.lambda$requestCredentials$0(AuthenticationService.java:78)
at org.jetbrains.idea.svn.auth.AuthenticationService.requestCredentials(AuthenticationService.java:106)
at org.jetbrains.idea.svn.auth.AuthenticationService.requestCredentials(AuthenticationService.java:77)
at org.jetbrains.idea.svn.commandLine.UsernamePasswordCallback.getCredentials(UsernamePasswordCallback.java:53)
at org.jetbrains.idea.svn.commandLine.CommandRuntime.handleErrorText(CommandRuntime.java:136)
at org.jetbrains.idea.svn.commandLine.CommandRuntime.onAfterCommand(CommandRuntime.java:96)
at org.jetbrains.idea.svn.commandLine.CommandRuntime.runWithAuthenticationAttempt(CommandRuntime.java:55)
at org.jetbrains.idea.svn.api.BaseSvnClient.execute(BaseSvnClient.java:122)
at org.jetbrains.idea.svn.api.BaseSvnClient.execute(BaseSvnClient.java:109)
at org.jetbrains.idea.svn.api.BaseSvnClient.execute(BaseSvnClient.java:95)
at org.jetbrains.idea.svn.info.CmdInfoClient.doInfo(CmdInfoClient.kt:103)
at org.jetbrains.idea.svn.SvnVcs.getInfo(SvnVcs.java:548)
at org.jetbrains.idea.svn.SvnVcs.getInfo(SvnVcs.java:553)
at org.jetbrains.idea.svn.SvnUtil.getRepositoryRoot(SvnUtil.java:405)
at org.jetbrains.idea.svn.history.SvnCommittedChangesProvider.getRepositoryRoot(SvnCommittedChangesProvider.java:163)
at org.jetbrains.idea.svn.history.SvnCommittedChangesProvider.getCommittedChanges(SvnCommittedChangesProvider.java:132)
at com.intellij.openapi.vcs.changes.committed.CommittedChangesCache.refreshCache(CommittedChangesCache.java:527)
at com.intellij.openapi.vcs.changes.committed.CommittedChangesCache.lambda$refreshCacheAsync$19(CommittedChangesCache.java:945)
at com.intellij.openapi.vcs.changes.committed.CommittedChangesCache.refreshCacheAsync(CommittedChangesCache.java:966)
at com.intellij.openapi.vcs.changes.committed.CommittedChangesCache.lambda$refreshAllCachesAsync$18(CommittedChangesCache.java:910)
at com.intellij.vcs.ProgressManagerQueue$MyWorker.run(ProgressManagerQueue.java:116)
at com.intellij.vcs.ProgressManagerQueue$1.run(ProgressManagerQueue.java:50)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:731)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:403)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
15 comments
Comment actions Permalink

Tried turning on interactive mode and giving a custom configuration location (~/user/.subversion) in settings -> Subversion (both were originally off). Doesn't make any difference, still seems to still want to query /etc/subversion/... which are empty dirs under centos 7.

Same exceptions, still need to login twice on every IDEA restart.

0
Comment actions Permalink

Does it work fine on the command line? I mean is password saved when you call svn on the command line?

When it comes to remembering SVN credentials, IDE relies on the command line client to do this. it is not Intellij that saves the password in this case, the Remember checkbox in the login prompt dialog controls the 

To solve this you should probably edit ~/.subversion/config and make sure store-auth-creds = yes (or not set), and password-stores is set to something supported on your system. If password-stores is not saved, credentials should be saved in simple storage, which means hashed in ~/.subversion/auth/svn.simple

As for the exceptions, IDE looks for configs int /etc only when there is no configs in user home and/or specified configuration path. If you don't have config file in the default place, make sure you have the correct path specified in Settings | Build, Execution, Deployment -> Use custom configuration directory

1
Comment actions Permalink

I do have ~/.subversion/config in my home directory, but IDEA is still looking under /etc ? even when I set a custom .subversion location IDEA it still tries /etc on startup.

My ~/.subversion/config is the default as far as I know, I've not edited it. Both my store-auth-creds and store-passwords are undefined (commented out) so should both default to yes.

If the remembering of passwords is dependant on the configuration of the ~/.subversion/config file then I wonder why IDEA has a remember me checkbox on every username/password prompt?

"Remember checkbox in the login prompt dialog controls the" - what?

 

0
Comment actions Permalink

I did briefly try to wipe (rename) my  ~/.subversion/ folder and hoped IDEA/svn  would rebuild it. But when I tried this got the two password prompts as usual in IDEA but then it got stuck retrieving history for much, much longer than normal. I had to kill it and restore my old subversion config before it'd work. Don't know why a blank setup would hang like that? Don't think there was anything in the idea.log, it was just hanging.

0
Comment actions Permalink

Looking at my ~/.subversion/config file again there's only one property that is configured (not a comment): password-stores is set to empty? (password-stores=).

Not sure if that's a default? or maybe something I had to do when using IDEA on our centos 6 boxes because they don't have libsecret.so? Did run into problems like that with IDEA before: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000043330-Help-with-cloning-a-repo-from-github?page=1#community_comment_360000051364 can't rememebr how I got out from under those errors, some configuration change or other.

0
Comment actions Permalink

> "Remember checkbox in the login prompt dialog controls the" - what?

The --no-auth-cache flag of the svn command. When the checkbox is not set, the flag is added to the command to make sure svn does not save auth data.

> Don't know why a blank setup would hang like that?

IntelliJ just calls svn command line (with specific params) and waits for it to finish. SVN should recreate the config. If for some reasons it can't reacreas teh settings and cannot finish, IDE will not show history.

> password-stores is set to empty?

yes, this is likely the reason. This line tells svn not to use any stores, and as a result password is not saved. Here is how config file describes the setting:

### To disable all password stores, use an empty list:
# password-stores =

Try commenting out the line.

> or maybe something I had to do when using IDEA on our centos 6 boxes because they don't have libsecret.so?

Could be the reason, if svn was configured to save to keychain. This is not the case AFAIU.

0
Comment actions Permalink

This also explains the stacktraces and attempted reading of /etc/subversion ? or are those something different?

I'll give it a go next week, think I'll need to create an IDEA only subversion/config dir. Which I'm hoping won't hang up like the last attempt did. Command line uses SASL auth, which I think ties into our windows domain in some way. I know its critical our subversion clients are compiled with SASL support enabled. Might be another reason this was changed.

0
Comment actions Permalink

> This also explains the stacktraces and attempted reading of /etc/subversion ?

It does not, actually, however, these exceptions are generally harmless. 

In fact, IDE searches for the config file to check if store-auth-creds property is disabled to gray-out the remember checkbox if it is, and show a warning. They should not affect saving of the credentials as it is done by the svn client itself.

0
Comment actions Permalink

Tried making the changes this morning. Copied my home .subversion into the IDEA user profile and set it as a custom subversion home in IDEA settings. Then edited the copied config so the store is set to: password-stores = gnome-keyring

Restarted IDEA, wiped the repo and auth cache history and tried to update, remember username/password on prompts.

Restarted IDEA again and tested for changes and am still being prompted for username and password on every restart.  Seems to have had no effect whatsoever?

Have to login twice not because of modules, but because the codebase contains an svn external. I get promoted for the other repos svn:externals credentials before the main codebases svn credentials, not sure if this is relevant at all?

Still see the /etc/subversion stacktraces, but nothing new, nothing about any kind of gnome-keyring failure? Don't get prompted at all for the gnome keyring password which I would've expected?

The OS has a 'Passwords and keys' app ( seahorse? ), which I think shows my keyring? have a default keyring, called Default, but its empty? shouldn't I be able to see any persisted IDEA passwords in here? 

0
Comment actions Permalink

hmm if I edit the home .subversion/config to make the same change. Then use command line svn I'm also prompted for credentials every time, even for same location in same shell session. Does this mean something is wrong with the subversion client? it's the default CentOS 7.6 one (1.7.14-14.el7), only version CentOS yum offers.

0
Comment actions Permalink

I've got the command line working with gnome-keyring, turns out I needed to install subversion-gnome package, which isn't included by default and apparently gnome-keyring-daemon produces no errors in its absence.

But now when I restart IDEA I'm back to a never ending "Refreshing VCS history" on startup. The version control panel seems unresponsive while this refresh is ongoing?

No new errors in idea.log.

0
Comment actions Permalink

Removing password-stores=gnome-keyring allows IDEA to start and show history (with multiple credential prompts), putting it back seems to hang IDEA VCS integration?

0
Comment actions Permalink

Ok I think I know what the hang is about. Seems IDEA is unable to negotiate the gnome-keyring password.

If I svn list the repo from the command line it prompts for the keyring password. If I then start IDEA after command line access it appears to work and use the same gnome-keyring auth/session?

if i just use IDEA first it hangs at the refresh VCS phase, never asks for any passwords.

So I need to remember to manually access every repo from the command line before starting IDEA every morning or after every server restart?

Oh its a bit more broken than that in the 2nd case (no prior command line auth). If I quit IDEA and exit the running VCS refresh processes then after IDEA exits I get a popup prompt for the gnome keyring. It's not just in the background, I have to quit IDEA before it shows?

0
Comment actions Permalink

Worse still the active gnome-keyring only appears to last for a few hours. Even if I do remember to do a command line auth before stating IDEA, its seems after a few hours of coding and it will get stuck refreshing/polling for VCS changes. Once its frozen seems the only way to recover is to quit IDEA, query svn and restart IDEA.

If I tell IDEA to remember passwords on login will it keep nagging me for my keychain password every few hours instead? (if it were working) That wouldn't be a vast improvement? If I leave the password-store unconfigured it only nags me every time I reopen the project, not every few hours.

0

Please sign in to leave a comment.