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

Not so easy to read error message if repositories folder is not writeable #641

Closed
gitblit opened this issue Aug 12, 2015 · 2 comments
Closed

Comments

@gitblit
Copy link
Owner

@gitblit gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 345

What steps will reproduce the problem?
1. Don't allow gitblit user (or whatever user is running gitblit server) to write in
repositoriesFolder
2. Try to create a new repository
3. Get an internal Server error in the webbrowser and find following messages in the
servers output:

INFO  create repository mygroup/myrepos.git
ERROR Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener
targeted at component [MarkupContainer [Component id = editForm]] threw an exception
org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener
targeted at component [MarkupContainer [Component id = editForm]] threw an exception
        at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:193)
        at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
        at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
        at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1279)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1358)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
        at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
        at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
        at com.gitblit.EnforceAuthenticationFilter.doFilter(EnforceAuthenticationFilter.java:87)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1046)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:369)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
        at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:944)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1005)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
        at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:196)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
        ... 36 more
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Creating directories
for /srv/gitblit/mygroup/myrepos.git failed
        at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:95)
        at com.gitblit.utils.JGitUtils.createRepository(JGitUtils.java:279)
        at com.gitblit.GitBlit.updateRepositoryModel(GitBlit.java:2440)
        at com.gitblit.wicket.pages.EditRepositoryPage$2.onSubmit(EditRepositoryPage.java:396)
        at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1595)
        at org.apache.wicket.markup.html.form.Form.process(Form.java:960)
        at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:922)
        ... 41 more
Caused by: java.io.IOException: Creating directories for /srv/gitblit/mygroup/myrepos.git
failed
        at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:315)
        at org.eclipse.jgit.internal.storage.file.FileRepository.create(FileRepository.java:251)
        at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:92)
        ... 47 more


What is the expected output? What do you see instead?

A "nice" error message in the browser instructing me to check the filesystem permissions

What version of the product are you using? On what operating system?
current snapshot of the master branch (1.4.0-SNAPSHOT)


Reported by guenter.dressel on 2013-11-27 09:27:08

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

I added a write check on startup when using Gitblit as a repository server.

Reported by James.Moger on 2013-12-01 15:47:10

  • Status changed: Queued
  • Labels added: Milestone-1.4.0

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

1.4.0 released.

Reported by James.Moger on 2014-03-09 18:06:21

  • Status changed: Done

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

2 participants