Content
Cannot bring svn with sv+ssh to work
Added by Johann Letzel about 7 years ago
Hi !
We are using the latest OpenProject Community Edition as Docker container.
We also have a SVN server which works via svn+ssh access.
I configured the an existing SVN repository inside a project inside OpenProject.
I tried different cominations:
- URL
svn+ssh://[IP]/[Path]
with credentials
- URL
svn+ssh://[User]@[IP]/[Path]
with credentials
- URL
svn+ssh://[User]@[IP]/[Path]
without credentials
(Critical data a replaced by placeholders here)
I always get a status 500. After activating log level :debug I can see the command which openproject uses to access the SVN repo.
For example:
App 331 stdout: Shelling out: `svn info --xml svn+ssh://[User]@[IP]/[PATH] --username xxxx --password xxxx --no-auth-cache --non-interactive` App 331 stdout: Rendering common/error.html.erb within layouts/base App 331 stdout: Rendered common/_error_base.html.erb (0.5ms) App 331 stdout: Rendered common/error.html.erb within layouts/base (20.0ms)
There is no detailed error message in the log.
When I execute the SVN command in command shell inside the Docker container, it works.
What could be the problem ? Where can I find further parts to analyse ?
Thanks in advance.
Regrds.
Replies (1)
After several days of digging through the Ruby sources and testing I figured out what went wrong:
Testing the repo in subversion.rb
After some reading I modified some lines for using another method in subversion.rb:
Now I am getting something in the logs:
That’s more helpful than nothing.
Incomplete change to user “app” in Docker container
With the error message above I could analyze the problem further.
The Passenger processes may run as user “app” but their environment still points to that one of “root”. After trying some configuration method, which didn’t work, I just modify the “web” script in
by adding following two lines
Conclusion
With the two fixes above I could enable the SVN access successfully. Maybe this will help others in the future too.