The doc site is not up to speed with the latest in the stable-2.0 branch. 
If it were, you would see a note explaining the following:

Note
> The login command in Ansible 2.0 requires using the Galaxy 2.0 Beta site. 
> Use the --server option to access https://galaxy-qa.ansible.com. You can 
> also add a *server* definition in the [galaxy] section of your 
> ansible.cfg file.
>

So as the above note explains, the login command only works with the beta 
site. This is true for import, delete and setup commands as well.

Apologies for the confusion. I'll see what we can do to update the doc 
site. 


--Chris


On Thursday, December 17, 2015 at 1:04:03 PM UTC-5, Bryan Hunt wrote:
>
> Hi there, it seems an API endpoint may have vanished.
> From - http://docs.ansible.com/ansible/galaxy.html
>
> Authenticate with Galaxy 
> <http://docs.ansible.com/ansible/galaxy.html#id14>
>
>
> "If you do not wish to use your GitHub password, or if you have two-factor 
> authentication enabled with GitHub, use the –github-token 
> option to pass a personal access token that you create. Log into GitHub, go 
> to Settings and click on Personal Access Token to create a token"
>
> The command line was throwing an exception about inability to JSON decode the 
> response - so I inserted a breakpoint into lib/ansible/galaxy/api.py
>
> From there, I discovered the URL and POST parameters being used. I then tried 
> calling from the command line using CURL.
>
> (I've stripped private info from the token)
>
> [~%]curl -XPOST "https://galaxy.ansible.com/api/v1/tokens"; --data 
> "github_token=XXXXXXXXXXXXXa934c175XXXXXXXXDXXXXXXXXe9d" | head
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  
> Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100  5934    0  5881  100    53   6447     58 --:--:-- --:--:-- --:--:--  6448
>
>
> <!DOCTYPE html>
> <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en-us">
> <head>
>     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
>     <meta name="viewport" content="width=device-width, initial-scale=1.0">
>     <meta name="author" content="Ansible, Inc" />
>     <link rel="shortcut icon" href="/static/img/favicon.ico" />
>
> It seems like the API endpoint is down or not mapped correctly or.. 
> suggestions please?
>
> I'm using Ansible from git, tried with versions devel and stable-2.0.
>
> Any ideas? 
>
> Bryan
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/37f078bb-2ff6-4d03-b90d-e915f89e0df9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to