When use gae remote error occured : com.google.appengine.repackaged.com.google.api.client.http.HttpResponseException: 302
<p>When I use gae remote api connect to remote server error occured like:</p>

<pre><code>com.google.appengine.repackaged.com.google.api.client.http.HttpResponseException: 302
        at com.google.appengine.repackaged.com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1070)
        at com.google.appengine.tools.remoteapi.OAuthClient.get(OAuthClient.java:64)
        at com.google.appengine.tools.remoteapi.RemoteApiInstaller.getAppIdFromServer(RemoteApiInstaller.java:413)
        at com.google.appengine.tools.remoteapi.RemoteApiInstaller.loginImpl(RemoteApiInstaller.java:376)
        at com.google.appengine.tools.remoteapi.RemoteApiInstaller.login(RemoteApiInstaller.java:337)
        at com.google.appengine.tools.remoteapi.RemoteApiInstaller.install(RemoteApiInstaller.java:173)
        at com.test.gae.ConnectRemoteGAETest.testConnect(ConnectRemoteGAETest.java:56)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
</code></pre>

<p>My code just like what docs gives:</p>

<pre class="lang-js prettyprint-override"><code>RemoteApiOptions options = new RemoteApiOptions()
    .server("your_app_id.appspot.com", 443)
    .useServiceAccountCredential("service@gserviceaccount.com",
                        "258a5.p12");

RemoteApiInstaller installer = new RemoteApiInstaller();
installer.install(options);
// ... all API calls executed remotely
installer.uninstall();
</code></pre>

<p>Is there something wrong in my code and how to handle this?</p>