在gerrit中创建repo时出错

时间:2017-01-02 11:23:52

标签: git

我正在Gerrit创建一个新的回购。提交后,显示 500内部服务器错误

通过检查日志,我收到以下错误:

[2017-01-02 09:31:10,557] ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in PUT /gerrit/projects/watson_api
com.google.gerrit.common.errors.ProjectCreationFailedException: Cannot create watson_api
    at com.google.gerrit.server.project.PerformCreateProject.createProject(PerformCreateProject.java:157)
    at com.google.gerrit.server.project.CreateProject.apply(CreateProject.java:142)
    at com.google.gerrit.server.project.CreateProject.apply(CreateProject.java:51)
    at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:305)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:279)
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:269)
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:180)
    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
    at com.google.gerrit.pgm.http.jetty.GetUserFilter.doFilter(GetUserFilter.java:76)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:70)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:113)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:64)
    at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:57)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
    at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1636)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:564)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:219)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:498)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:98)
    at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:92)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:98)
    at org.eclipse.jetty.server.Server.handle(Server.java:461)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:284)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
    at java.lang.Thread.run(Thread.java:745)
 Caused by: org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: Cannot create repository watson_api
    at com.google.gerrit.server.git.LocalDiskRepositoryManager.createRepository(LocalDiskRepositoryManager.java:228)
    at com.google.gerrit.server.project.PerformCreateProject.createProject(PerformCreateProject.java:115)
    ... 43 more
Caused by: java.io.IOException: Creating directories for /var/git/repos/watson_api.git failed
    at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:316)
    at org.eclipse.jgit.internal.storage.file.FileRepository.create(FileRepository.java:271)
    at com.google.gerrit.server.git.LocalDiskRepositoryManager.createRepository(LocalDiskRepositoryManager.java:216)
    ... 44 more

有什么想法吗? 我的Gerrit容器已启动并正在运行。版本:2.10.6

1 个答案:

答案 0 :(得分:0)

错误显示Creating directories for /var/git/repos/watson_api.git failed。您的Gerrit正在运行的用户似乎没有文件系统权限来在所述位置创建目录。