nlamirault / emacs-gitlab

A Gitlab client for Emacs
GNU General Public License v2.0
140 stars 30 forks source link

POST /session moved permanently gitlab.com #27

Closed vindarel closed 8 years ago

vindarel commented 8 years ago

Hey, it's official I can't get my session token. With gitlab.com I get a "301 moved permanently error".

Do you confirm the doc of the readme is working ?

the line

$ curl http://yourgitlabhost/api/v3/session/ --data-urlencode 'login=yourUserName' --data-urlencode 'password=yourPassword'

looks wrong to me because gitlab wants a POST (so without urlencode I guess). But a command like

curl -X POST http://www.gitlab.com/api/v3/session --data "login=me" --data "password=xxx"

gives the same error.

Am I doing something wrong ? Thanks !

nlamirault commented 8 years ago

Documentation is wrong. I will fix that. You could try session API using the unit tests :

$ cask exec ert-runner -t session
[gitlab] Cleanup path
Set Gitlab TokenID
[gitlab] Session ID: Suu8-8SarRYyQtezr1kJ
.
Ran 1 test in 0.680 seconds