Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeanyVC: support subversion authenticated commit #777

Open
andrewhotlab opened this issue Sep 21, 2018 · 9 comments
Open

GeanyVC: support subversion authenticated commit #777

andrewhotlab opened this issue Sep 21, 2018 · 9 comments

Comments

@andrewhotlab
Copy link

I just started to use Geany, coming from Bluefish... it's really a great tool and I wish to tank everyone contributing!

I only noticed a problem when I try commit to a Subversion repository which needs the user to be authenticated. No problem wen I commit to a repository which does not require authentication.

Here is the screenshot of a packet capture between client and SVN server which shows the issue:

commit_unauthorized

I think to be unable to fix without help from someone. Thanks!

@b4n
Copy link
Member

b4n commented Sep 21, 2018

GeanyVC uses the real svn commands under the hood, so it should be possible to get this to work.
I am not knowledgeable about SVN authenticated commits; what would you do to get this to work on the command line? GeanyVC uses svn commit --non-interactive -m "MESSAGE" FILE_LIST

@andrewhotlab
Copy link
Author

I guess that in order to achieve this, the plugin should start managing interactive usage... or it would be solved by getting the error code which is returned if unauthorized (1) and try again by asking username/password to the user and issuing the command svn commit --user USERNAME --passwd PASSWORD --non-interactive -m "MESSAGE" FILE_LIST

svn exits with error code "1" in that case, and outputs on stderr this string:

svn: E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option
svn: E215004: Commit failed (details follow):
svn: E215004: No more credentials or we tried too many times.

@b4n
Copy link
Member

b4n commented Sep 21, 2018

Can't username and password be set somewhere in a SVN configuration file?

@andrewhotlab
Copy link
Author

Not in the SVN working directory, but svn can save user credentials under several files in the ~/.subversion/auth directory tree. However I guess it might be tricky to parse them all and get the right credentials to use for the current working directory commit. Moreover, to save subversion passwords in that way is not very safe.
I think it should be simpler to ask for credentials each time we need them, or make the user store them in Geany preferences.

@elextr
Copy link
Member

elextr commented Sep 21, 2018

Can't you just remove the --non-interactive to have svn prompt for credentials? By the nature of an IDE Geany is totally insecure, better to have handle svn usernames and passwords.

@b4n
Copy link
Member

b4n commented Sep 21, 2018

@elextr the command is not run in a TTY, there's no way for the user to interact -- or that would be on the terminal from which Geany was launched at best, if stdin was inherited.

@elextr
Copy link
Member

elextr commented Sep 21, 2018

ok, well, might as well just configure --username and --passwd on the commands, oh wait, its not configurable :(

@andrewhotlab
Copy link
Author

@b4n I was thinking that GeanyVC does not seems to have the ambition to serve as a full replacement of a VC client, thus it will be OK to save credentials using svn after all...
However, if it wouldn't be too difficult to parse svn output, I'm sure a lot of people will appreciate the "ask for credentials if commit fails" behavior I proposed here above.

@nomadbyte
Copy link
Contributor

nomadbyte commented Nov 14, 2020

GeanyVC is just as lightweight as the Geany itself :)

So in editor context GeanyVC rather assumes that the underlying repositories have been properly set up, which includes logins credentials needed for clone, pull (if any). This way GeanyVC does not need to deal with managing the logins for all the VCS it supports, and just focuses on managing local file changes.

Some VCSs make it simpler to manages login details (like Git's remotes). Subversion has its own way of "remembering" passwords. SVN+SSH further helps make the authentication transparent by using proper keys automatically so you won't need to type either username or password details with SVN commands at all.

If it's still relevant, you may check out the SO thread https://stackoverflow.com/questions/2899209/how-to-save-password-when-using-subversion-from-the-console on the subject.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants