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

Url panel breaks when implicit SSH url is specified in web.otherUrls #607

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

Comments

@gitblit
Copy link
Collaborator

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 311

What steps will reproduce the problem?
1.Upgrade from 1.2.1 to 1.3.2
2.Loggin as any user
3.Go to summary page on any repo

What is the expected output? What do you see instead?
The summary of the repository but istead I get a erro page

What version of the product are you using? On what operating system?
Gitblit 1.3.2 on centOS 6. 
Repositories are outside the gitblit dir but they have all rights for read/write by
the user running the service.

Please provide any additional information below.
Log at the server side:
ERROR Error attaching this container for rendering: [MarkupContainer [Component id
= menu]]
org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering:
[MarkupContainer [Component id = menu]]
        at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1789)
        at org.apache.wicket.Component.onBeforeRender(Component.java:4001)
        at org.apache.wicket.Component.internalBeforeRender(Component.java:1069)
        at org.apache.wicket.Component.beforeRender(Component.java:1103)
        at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1777)
        at org.apache.wicket.Component.onBeforeRender(Component.java:4001)
        at org.apache.wicket.Component.internalBeforeRender(Component.java:1069)
        at org.apache.wicket.Component.beforeRender(Component.java:1103)
        at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1777)
        at org.apache.wicket.Component.onBeforeRender(Component.java:4001)
        at org.apache.wicket.Component.internalBeforeRender(Component.java:1069)
        at org.apache.wicket.Component.beforeRender(Component.java:1103)
        at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1777)
        at org.apache.wicket.Component.onBeforeRender(Component.java:4001)
        at org.apache.wicket.Page.onBeforeRender(Page.java:1555)
        at com.gitblit.wicket.pages.BasePage.onBeforeRender(BasePage.java:118)
        at com.gitblit.wicket.pages.RepositoryPage.onBeforeRender(RepositoryPage.java:575)
        at org.apache.wicket.Component.internalBeforeRender(Component.java:1069)
        at org.apache.wicket.Component.beforeRender(Component.java:1103)
        at org.apache.wicket.Component.prepareForRender(Component.java:2297)
        at org.apache.wicket.Page.prepareForRender(Page.java:1545)
        at org.apache.wicket.Component.prepareForRender(Component.java:2329)
        at org.apache.wicket.Page.renderPage(Page.java:912)
        at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
        at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
        at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1287)
        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:1300)
        at com.gitblit.EnforceAuthenticationFilter.doFilter(EnforceAuthenticationFilter.java:87)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
        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.ContextHandler.doHandle(ContextHandler.java:1038)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)
        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:363)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
        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:628)
        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(Unknown Source)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(Unknown Source)
        at com.gitblit.wicket.panels.RepositoryUrlPanel.getProtocolPermissionDescription(RepositoryUrlPanel.java:368)
        at com.gitblit.wicket.panels.RepositoryUrlPanel$1.populateItem(RepositoryUrlPanel.java:150)
        at org.apache.wicket.markup.repeater.RefreshingView$1.newItem(RefreshingView.java:114)
        at org.apache.wicket.markup.repeater.DefaultItemReuseStrategy$1.next(DefaultItemReuseStrategy.java:71)
        at org.apache.wicket.markup.repeater.DefaultItemReuseStrategy$1.next(DefaultItemReuseStrategy.java:68)
        at org.apache.wicket.markup.repeater.RefreshingView.addItems(RefreshingView.java:189)
        at org.apache.wicket.markup.repeater.RefreshingView.onPopulate(RefreshingView.java:98)
        at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:131)
        at org.apache.wicket.markup.repeater.AbstractPageableView.onBeforeRender(AbstractPageableView.java:121)
        at org.apache.wicket.Component.internalBeforeRender(Component.java:1069)
        at org.apache.wicket.Component.beforeRender(Component.java:1103)
        at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1777)
        ... 56 more


Reported by doropeza on 2013-09-18 20:54:13

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

What do you have in web.otherUrls ?

Reported by James.Moger on 2013-09-19 11:40:03

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

I have web.otherUrls = git@respaldo:{0}

The git.repositoriesFolder is at /home/git/repositories and gitblit is at /home/git/gitblit

The only way to enter at the repo page is as an anonymous user. If I leave web.otherUrls
in blank, the url of the repository at the repo page is in blank too.

Reported by doropeza on 2013-09-19 12:43:38

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Ok.  That is ssh shorthand, right?  (I don't use SSH).  Gitblit expects a fully specified
protocol:

ssh://git@respaldo:{0}

Reported by James.Moger on 2013-09-19 12:51:14

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Reported by James.Moger on 2013-09-19 12:54:05

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

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

I have pushed a fix to master that will allow use of the shorthand url, but for now
you'll have to specify ssh://.

Reported by James.Moger on 2013-09-19 13:04:34

  • Status changed: Queued

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Thank you, that works with the authenticated user and the url is now displayed :)

However I have new questions. As I said before if I enter as an anonymous user at the
repo page I get a blank space at the repo clone url. 

The default access restriction is CLONE, Is that the reason than the url is not showing
with anonymous access?. Can it be still displayed? :(

Oh I think that I've found another bug. When I click on the login form without enter
any information on the inputs a error page is displayed. If you want me to add this
as another new issue I'll be please to do it.

Reported by doropeza on 2013-09-19 14:51:34

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Anonymous access.  Because you have disabled anonymous repo access (CLONE restricted)
Gitblit does not display clone urls.  There are several permutations of config options
for controlling gitblit-as-a-viewer (if that is what you are doing) so you'll have
to experiment a little to get what you want. http://gitblit.com/setup_viewer.html

Login problem.  Yes, please file as separate issue.

Reported by James.Moger on 2013-09-19 14:59:37

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

1.4.0 released.

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

  • Status changed: Done

@gitblit gitblit closed this as completed Aug 12, 2015
@flaix flaix modified the milestone: 1.4.0 Dec 13, 2016
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