Open RKBK opened 3 years ago
That's the shell command that Projectile uses to obtain the list of project files:
(defcustom projectile-svn-command "svn list -R . | grep -v '$/' | tr '\\n' '\\0'"
"Command used by projectile to get the files in a svn project."
:group 'projectile
:type 'string)
It seems to me the error comes directly from it in your case.
When running just the first part,
svn list -R .
I get asked to provide my svn password. Afterwards it asks me to provide a password for a new default keychain. After pressing cancel, a list of all the files in the repository gets dumped to the terminal window.
However, with the full piped command as written above, there is never an option for me to provide my password. So I suppose this is the issue. Does the command assume that you've somehow cached your svn password?
I found that there is such an option in subversion, https://unix.stackexchange.com/questions/191048/how-to-make-svn-save-credentials-when-non-interactive . However, would it be useful for projectile to handle the user supplying a password?
OK, actually, if I allow the first command to create a new keychain, the password is stored. And then, the projectile command works fine. So maybe this is the way to solve it, not by changing projectile.
However, with the full piped command as written above, there is never an option for me to provide my password. So I suppose this is the issue. Does the command assume that you've somehow cached your svn password?
I guess so. This was done a long time ago and I haven't used SVN in ages, so I don't really remember. We can maybe add some note in the docs for posterity's sake.
I just restarted emacs and ran into the same thing. To be clear, what I end up having to do is:
M-x eshell
svn list -R .
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!
This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.
I just encountered the same problem. For svn to ask for a password via its password stores interface, I need the flag "--force-interactive" added to the command line. Somehow when svn is run from within emacs, it seems to assume non-interactive mode of operation and it refuses to ask for passwords then.
This is the full projectile-svn-command
and it works now:
svn --force-interactive list -R . | grep -v '$/' | tr '\n' '\0'
I already had vc-svn-global-switches
configured to "--force-interactive"
for Emacs' built-in vc-svn to work. Maybe projectile should honor that variable?
Projectile also does not detect the root of SVN repositories out-of-the-box. I had to put projectile-root-top-down-recurring
as first element in projectile-project-root-functions
.
Is there a way to re-open the issue now, or should I create a new issue?
I suspect this is a configuration problem on my end, but I'm not quite sure how to solve it.
Expected behavior
Files should be findable.
Actual behavior
The error
svn: E170013: Unable to connect to a repository at URL 'https://our/central/repository/project' svn: E215004: No more credentials or we tried too many times. Authentication failed
Steps to reproduce the problem
Inside a project file, invoke projectile (I use C-c p), select projectile-find-file: error results
Environment & Version information
Projectile version information
Emacs version
27.1
Operating system
Ubuntu 20.04 under windows subsystem for linux (version 1)