How can one connect using remote_shell_api.py to a development instance of Google App Engine started with dev_appserver.py (1.9.26+)?
From the command line I get:
$ remote_api_shell.py -s localhost:8080 demo
...
urllib2.HTTPError: HTTP Error 401: Unauthorized Too many auth attempts.
When run from a script with something like this:
from google.appengine.ext.remote_api import remote_api_stub
from google.appengine.tools import appengine_rpc
def fake_auth():
return ('pw', 'pass')
remote_api_stub.ConfigureRemoteApi(
None, path, fake_auth, servername=server,
save_cookies=True, secure=False,
rpc_server_factory=appengine_rpc.HttpRpcServer
)
One gets:
google.appengine.tools.appengine_rpc.ClientLoginError: HTTP Error 403: Forbidden
I have traced back through the AppEngine code but it is not apparent whether (or how) one is to fake authentication to the local server.
When I try OAuth in the code, e.g.
remote_api_stub.ConfigureRemoteApiForOAuth(server, path, secure=True)
It throws an HTTPS error.
When I set secure to False one gets urllib2.HTTPError: HTTP Error 401: Unauthorized Too many auth attempts.
It looks like there should be a way to authenticate to a development appserver, as there is code to that effect at google.appengine.tools.appengine_rpc.py:347 but I have not yet gleaned how to employ it.
Has anyone worked this out yet?
As reported: code.google.com/p/googleappengine Issue 12465
localhostvs the app server maybe starting with a--hostoption. Also you should be passing anapp_idwhen usingConfigureRemoteApi. It would be in the format:s~<app_id>.