java-gitlab-api icon indicating copy to clipboard operation
java-gitlab-api copied to clipboard

Session Not Working

Open raya-studio opened this issue 7 years ago • 4 comments

When I'm using the method below, It will throw java.io.FileNotFoundException.

GitlabSession session = GitlabAPI.connect("https://myGitlabURL", "username", "password");

The GitlabAPI is working well, the problem is the session and createUser. Thanks in advance.

raya-studio avatar Dec 14 '17 06:12 raya-studio

I've the same problem! There's anything I can make to get GitLabSession?

lukevbr avatar Dec 26 '17 20:12 lukevbr

/session endpoint was removed in GitLab 10.2+

Instead, you need to use OAuth2 authentication. Either write code for that or use gmessner/gitlab4j library that already has that implemented (gmessner/gitlab4j-api#111)

Here (lines 48-70) you can see an example of how OAuth2 GitLab authentication can be done from Java.

slonopotamus avatar Jan 14 '18 21:01 slonopotamus

Is there any solution to this problem?

renatoramiro avatar Jul 25 '18 18:07 renatoramiro

It'd be nice to have such a code include in there, because afaik, gitlab4j is not compatible with android java (?)

cerisara avatar Dec 30 '19 13:12 cerisara