Gerrit2.0.3 installation - longin failure with "Provider is not supported, or was incorrectly entered"

2,538 views
Skip to first unread message

lenard

unread,
Feb 25, 2009, 9:23:19 PM2/25/09
to Repo and Gerrit Discussion
Hi all,

I'm trying to install gerrit.0.3 on my ubuntu8.0.4 and following steps
http://gerrit.googlecode.com/svn/documentation/2.0/install.html.

I have come to "Administrator Setup". it says "Login to Gerrit through
the web interface, so that a user account is initialized for you."
does it mean gerrit will create the user account automatically when I
login with any user account?
I connect to gerrit from another machine and select 'Sign in' in the
main page. after I enter a user name, it always comes out "Provider is
not supported, or was incorrectly entered."
so how can I add a user account to login?

thans for any suggestions!

Shawn Pearce

unread,
Feb 25, 2009, 9:29:30 PM2/25/09
to repo-d...@googlegroups.com
On Wed, Feb 25, 2009 at 18:23, lenard <zhaoli...@gmail.com> wrote:

I'm trying to install gerrit.0.3 on my ubuntu8.0.4 and following steps
http://gerrit.googlecode.com/svn/documentation/2.0/install.html.

I have come to "Administrator Setup". it says "Login to Gerrit through
the web interface, so that a user account is initialized for you."
does it mean gerrit will create the user account automatically when I
login with any user account?

Yes.  Accounts are automatically created upon first sign in.
 
I connect to gerrit from another machine and select 'Sign in'  in the
main page. after I enter a user name, it always comes out "Provider is
not supported, or was incorrectly entered."
so how can I add a user account to login?

You need to specify an OpenID identity URL, not just a username.  Gerrit is saying "provider is not supported" because the string you are entering isn't a URL that Gerrit can use to talk to an OpenID provider.

Click on the "Sign in with a Google Account" or "Sign in with a Yahoo! ID" hyperlink to use an existing Google Account/GMail Account or Yahoo!/Yahoo! Mail account to login to your Gerrit instance.

Or, enter the OpenID identity for another OpenID provider, such as from http://claimid.net/.

When you sign-in, the account record is automatically created.

lenard

unread,
Feb 26, 2009, 6:17:10 AM2/26/09
to Repo and Gerrit Discussion
Hi Shawn Pearce,

thanks for your response. but it seems it still doesnt work.

after I click "Sign in with a Yahoo! ID", there is "https://
me.yahoo.com"
in "Sign in" bar and "Provider is not supported, or was incorrectly
entered." is still there.
I also tried to click on the "Sign in with a Google Account"
and fill "http://claimid.net/" in the "Sign in" bar. both of them do
not
work.

On Feb 26, 10:29 am, Shawn Pearce <s...@google.com> wrote:
> Or, enter the OpenID identity for another OpenID provider, such as fromhttp://claimid.net/.

Shawn Pearce

unread,
Feb 26, 2009, 2:10:23 PM2/26/09
to repo-d...@googlegroups.com
Any useful stack traces in your servlet container's logs?  Usually when Gerrit can't understand a provider it logs it.

Are you behind a firewall?  Do you need an HTTP proxy server to connect to the Internet?  Is it possible your servlet container doesn't know how to transit through the proxy server in order to talk to the OpenID provider?

josh...@gmail.com

unread,
Mar 18, 2009, 7:49:49 PM3/18/09
to Repo and Gerrit Discussion
Hi
i have the same problem mentioned above.
- login using OpenID failed with the message "Provider is not
supported, or was incorrectly entered"

i installed Gerrit v.2.0.6.7 and i got the message from jetty as
follows

-------------------------------------------------------------------------------------------
2009-03-18 19:45:42.884:/:WARN: Unexpected error during
authentication
org.openid4java.discovery.DiscoveryException: 0x601: Fatal transport
error:
at org.openid4java.discovery.html.HtmlResolver.discover
(html:HtmlResolver.java):118)
at org.openid4java.discovery.Discovery.discover
(discovery:Discovery.java):163)
at org.openid4java.discovery.Discovery.discover
(discovery:Discovery.java):115)
at org.openid4java.consumer.ConsumerManager.discover
(consumer:ConsumerManager.java):527)
at com.google.gerrit.server.OpenIdLoginServlet.doAuth
(OpenIdLoginServlet.java:174)
at com.google.gerrit.server.OpenIdLoginServlet.doPost
(OpenIdLoginServlet.java:140)
at com.google.gerrit.server.OpenIdLoginServlet.doGet
(OpenIdLoginServlet.java:128)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
502)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1148)
at com.google.gwtexpui.server.CacheControlFilter.doFilter
(CacheControlFilter.java:76)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1139)
at com.google.gerrit.server.UrlRewriteFilter.doFilter
(UrlRewriteFilter.java:113)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1139)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:378)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle
(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
535)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
(QueuedThreadPool.java:520)
Caused by: org.apache.commons.httpclient.ConnectTimeoutException: The
host did not accept the connection within timeout of 3000 ms
at
org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket
(ReflectionSocketFactory.java:154)
at
org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket
(SSLProtocolSocketFactory.java:129)
at org.apache.commons.httpclient.HttpConnection.open
(HttpConnection.java:706)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:
1321)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry
(HttpMethodDirector.java:386)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod
(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod
(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod
(HttpClient.java:324)
at org.openid4java.util.HttpCache.get(util:HttpCache.java):174)
at org.openid4java.discovery.html.HtmlResolver.discover
(html:HtmlResolver.java):99)
... 30 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect
(AbstractPlainSocketImpl.java:310)
at java.net.AbstractPlainSocketImpl.connectToAddress
(AbstractPlainSocketImpl.java:176)
at java.net.AbstractPlainSocketImpl.connect
(AbstractPlainSocketImpl.java:163)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:381)
at java.net.Socket.connect(Socket.java:537)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:570)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket
(ReflectionSocketFactory.java:139)
... 39 more
-------------------------------------------------------------------------------------------

and the i use internet thru HTTP proxy.
i need your help : )

Thanks!!


On Feb 26, 3:10 pm, Shawn Pearce <s...@google.com> wrote:
> Any useful stack traces in your servlet container's logs?  Usually when
> Gerrit can't understand a provider it logs it.
>
> Are you behind a firewall?  Do you need an HTTP proxy server to connect to
> the Internet?  Is it possible your servlet container doesn't know how to
> transit through the proxy server in order to talk to the OpenID provider?
>

Shawn Pearce

unread,
Mar 18, 2009, 8:17:21 PM3/18/09
to repo-d...@googlegroups.com
On Wed, Mar 18, 2009 at 16:49, josh...@gmail.com <josh...@gmail.com> wrote:
>
> i have the same problem mentioned above.
> - login using OpenID failed with the message "Provider is not
> supported, or was incorrectly entered"
...

> 2009-03-18 19:45:42.884:/:WARN: Unexpected error during
> authentication
> org.openid4java.discovery.DiscoveryException: 0x601: Fatal transport
> error:
> at org.openid4java.discovery.html.HtmlResolver.discover
> (html:HtmlResolver.java):118)
...

> Caused by: java.net.SocketTimeoutException: connect timed out
...

> and the i use internet thru HTTP proxy.


According to openid4java's documentation:

http://code.google.com/p/openid4java/wiki/ConsumerForwardProxy

To make this work Gerrit needs a code change to permit proxy
configuration. We don't do this
HttpClientFactory.setProxyProperties(proxyProps) call they recommend.

Patches are welcome. :-)

FWIW, the init code would probably need to go in OpenIdServiceImpl's
constructor. The proxy settings could go in a file in $site_path, or
in the system_config table. Either are available off that
GerritServer instance the constructor is already fetching...

Suinn Park

unread,
Mar 18, 2009, 10:07:44 PM3/18/09
to repo-d...@googlegroups.com
 I'm really  really impressed thanks to you and appreciate prompt answer from you!

and usually i don't use Java and PostgreSQL.

so could  you please explain it easily to follow up the solution? Frankly, i don't know how to set http_proxy myself.

Sorry for bothering you

Suinn Park

unread,
Mar 18, 2009, 10:44:28 PM3/18/09
to repo-d...@googlegroups.com
> The proxy settings could go in a file in $site_path, or
in the system_config table
 
i'd better deal with  $site_path for http_proxy settings :)

Shawn Pearce

unread,
Mar 18, 2009, 10:50:04 PM3/18/09
to repo-d...@googlegroups.com
On Wed, Mar 18, 2009 at 19:44, Suinn Park <josh...@gmail.com> wrote:
>> The proxy settings could go in a file in $site_path, or
> in the system_config table
>
> i'd better deal with $site_path for http_proxy settings :)

Yea, I think so too, especially since the database is meant to be
replicated to slaves, which can be brought up quickly if the primary
fails. The slave might need/want a different proxy settings, e.g. if
it was in a different network location and had a closer proxy.

> On Thu, Mar 19, 2009 at 11:07 AM, Suinn Park <josh...@gmail.com> wrote:
>>
>> I'm really really impressed thanks to you and appreciate prompt answer
>> from you!
>>
>> and usually i don't use Java and PostgreSQL.
>>
>> so could you please explain it easily to follow up the solution? Frankly,
>> i don't know how to set http_proxy myself.

Install Eclipse, get the Gerrit source code, follow the Eclipse setup
part of the Gerrit documentation.

site_path is available as a File in OpenIdServiceImpl's constructor

server.getSitePath()

You could read a git style configuration file e.g.:

final File cfgFile = new File(server.getSitePath(), "gerrit.config");
final RepositoryConfig cfg = new RepositoryConfig(null, cfgFile);
try {
cfg.load();
} catch (FileNotFoundException notFound) {
// Assume no configuration
}

And read properties off it, e.g. with:

cfg.getString("gerrit",null,"proxyserver", null);

and the file would look like:

[gerrit]
proxyserver = myproxy
proxyport = myport

Fill in the blanks...

Suinn Park

unread,
Mar 19, 2009, 2:32:28 AM3/19/09
to repo-d...@googlegroups.com
Only what i can say to you now is  "Thank you verrrrrry much, i really appreciate it" : )
 
Actually i'm introducing and implementing Gerrit2 code review system for the project that i'm working on,
 
because it's 'Open Source' as you wish from 'Rietveld' code riview tool and i think i can trust you who work for Google : ).
 
So i searched code review system from the background of Mondrian-> 'Rietveld' to Gerrit -> Gerrit2.
 
(I think the review system is substantially important and necessary.)
 
that's why I wanna trying introducing the system to my team.
 
But it's dfficult for me to run the system with Gerrit2 installation guide and the like.
 
From the starting point, for example, i failed to build Gerrit from the source - git clone git://android.git.kernel.org/tools/gerrit.git,
 
,I thought, because of the http_proxy. so i surfed the internet to find the solution. . .  and i couldn't get solution. so i downloaded it thru
 
git web and commanded "mvn package". and as u see and expect, it faild, file-transfering failed also... so i used the binary
 
'gerrit.war v2.0.6-7-gdd95666' itself ..
 
anyway, i've gotten many troubles else... i'm not just conplaining but just need help :)
 
umm...
 
 
so far,,, anyway so now Jetty is running on my desktop and i can access the gerrit main web page using my ip address:8080. but login access is not possible as i mentioned.
 
actually i expected that i might be able to set http_proxy  using some simple commands. like i did  ' psql -c "UPDATE system_config SET git_base_path='srv'/git''" reviewdb '...
 
And now i'm also worring about a few things more.
 
1. http_proxy settings as i mentioned
 
2. Regarding to account settings,,,
    Members may not use OpenID to log in gerrit that will be running as private instance on my desktop(server).
    So how can i deal with ,or generate local/private accounts  in 'reviewdb'? 
    i can access thru ssh connection using 'PuTTY'. Just connection is possible but i don't know what i should input as login id.
    and finally i got the popup message 'Disconnected: No supported authentication methods available'.
  
and also when i tried to ssh-connect to 
Gerrit using other Ubuntu terminal, i failed
   # ssh -p 29418 165.213.196.214
      Permission denied (publickey).
 
3. Git repository setting/configuration..
   umm.. under /srv/git directory, more specific setting is necessary? and is there any example or specific guideline ..
   
   
 
Thank you so much :)  

Shawn Pearce

unread,
Mar 19, 2009, 10:33:13 AM3/19/09
to repo-d...@googlegroups.com
On Wed, Mar 18, 2009 at 23:32, Suinn Park <josh...@gmail.com> wrote:
>
> because it's 'Open Source' as you wish from 'Rietveld' code riview tool and
> i think i can trust you who work for Google : ).

If you are suggesting I work for the Google Open Source Programs
Office (OSPO), you'd be right. But we're not the only group here that
writes open source software. A lot of teams open source the code they
work on. We're here more as a facilitator than as a bucket for
developers to sit in. The amount of code OSPO open sources and
maintains is nothing compared to what the rest of the company does.
GWT, protobuf, Chromium, Android, Rietveld ... there are hundreds of
projects from all over the world that have been open sourced.

> From the starting point, for example, i failed to build Gerrit from the
> source - git clone git://android.git.kernel.org/tools/gerrit.git,
> ,I thought, because of the http_proxy. so i surfed the internet to find the
> solution. . . and i couldn't get solution. so i downloaded it thru
> git web and commanded "mvn package". and as u see and expect, it faild,

Building from the snapshot tar on gitweb works fine. You probably ran
into issues with Maven trying to download dependencies for both itself
and for Gerrit; it didn't know about your proxy server and wasn't able
to perform the downloads.

> so far,,, anyway so now Jetty is running on my desktop and i can access the
> gerrit main web page using my ip address:8080. but login access is not
> possible as i mentioned.
>
> actually i expected that i might be able to set http_proxy using some
> simple commands. like i did ' psql -c "UPDATE system_config SET
> git_base_path='srv'/git''" reviewdb '...

That's what this entire thread has been about; there is currently no
http_proxy support, so you can't just set it in system_config.

> And now i'm also worring about a few things more.
>
> 1. http_proxy settings as i mentioned
>
> 2. Regarding to account settings,,,
> Members may not use OpenID to log in gerrit that will be running as
> private instance on my desktop(server).
> So how can i deal with ,or generate local/private accounts in
> 'reviewdb'?

Don't use OpenID.

Instead configure Gerrit for HTTP Basic Authentication, see:

http://gerrit.googlecode.com/svn/documentation/2.0/config-sso.html

and configure Jetty for HTTP Basic Authentication, see:

http://docs.codehaus.org/display/JETTY/Realms

probably by editing $JETTY_HOME/contexts/gerrit.xml to insert the
securityHandler block.

If you do this, then the HTTP proxy is no longer an issue. The *ONLY*
time Gerrit tries to communicate with an outside server is to complete
the OpenID authentication process. If you aren't using OpenID, you
don't have to worry about its network connectivity settings.

> i can access thru ssh connection using 'PuTTY'. Just connection is
> possible but i don't know what i should input as login id.
> and finally i got the popup message 'Disconnected: No supported
> authentication methods available'.

Gerrit only supports public key authentication; password
authentication is explicitly disabled. You will need to first
configure Gerrit for HTTP authentication as I just mentioned, then
login once, go to Settings > SSH Keys, and add your public SSH key.
You would also need to configure PuTTY to use that same SSH key when
logging into the server. Only then you can try to login... but you
will receive a "gerrit: no shell available" message, because it is a
restricted shell environment.

> and also when i tried to ssh-connect to
> Gerrit using other Ubuntu terminal, i failed
> # ssh -p 29418 165.213.196.214
> Permission denied (publickey).

Yup, again, only public key authentication is enabled.

> 3. Git repository setting/configuration..
> umm.. under /srv/git directory, more specific setting is necessary? and
> is there any example or specific guideline ..

I'm not sure what you mean. Make /srv/git readable/writable by the
user that is running Gerrit. Usually I just chown it to that user.

Create a git repository within this directory, e.g.:

git --git-dir=/srv/git/ourcode.git init

and then register that in Gerrit's database, per the project setup doc:

http://gerrit.googlecode.com/svn/documentation/2.0/project-setup.html

Reply all
Reply to author
Forward
0 new messages