algorys / gitlabproject

Dokuwiki plugin to display a Gitlab project
3 stars 4 forks source link

ssl connection #1

Closed schmalgo closed 7 years ago

schmalgo commented 7 years ago

Hey,

I tried to use the dokuwiki plugin (2017-06-01) using an self-signed gitlab server. With either a personal access token or an impersonation token. Neither of them work...

My settings: $conf['plugin']['gitlabproject']['server.default'] = 'https://gitlab.local'; $conf['plugin']['gitlabproject']['token.default'] = 'N-something';

This works in a browser https://gitlab.local/testing/me?private_token=N-something

Wiki: (I switch debuggin in php on)

Notice: Undefined index: error in /var/www/dokuwiki-2017-02-19b/lib/plugins/gitlabproject/syntax.php on line 85 Notice: Undefined offset: 1 in /var/www/dokuwiki-2017-02-19b/lib/plugins/gitlabproject/syntax.php on line 145 Warning: array_merge(): Argument #1 is not an array in /var/www/dokuwiki-2017-02-19b/lib/plugins/gitlabproject/gitlab/gitlab.php on line 38 Warning: Invalid argument supplied for foreach() in /var/www/dokuwiki-2017-02-19b/lib/plugins/gitlabproject/gitlab/gitlab.php on line 43 Warning: Invalid argument supplied for foreach() in /var/www/dokuwiki-2017-02-19b/lib/plugins/gitlabproject/syntax.php on line 133

algorys commented 7 years ago

Hey,

Happy you tried to use my plugin :smile:

I've no ssl gitlab server to test it actually, but it seems that plugin can't get your Members...

Can you please tell me your Gitlab version ?

And please try following URLs in your browser and tell me what results you have:

https://gitlab.local/api/v3/projects/ID_PROJECT/?private_token=TOKEN

https://gitlab.local/api/v3/projects/ID_PROJECT/members/?private_token=TOKEN

https://gitlab.local/api/v3/groups/NAMESPACE_NAME/members/?private_token=TOKEN

Those are the 3 URLs I use in this plugin to make requests.

To see if you get results or not.

schmalgo commented 7 years ago

Hmm, the requests return valid data.

The gitlab version is 9.1.4

algorys commented 7 years ago

@schmalgo ok, I've made some research and make a gitlab server in 443 for tests.

So, it seems it's due to DokuHTTPClient who want to check self-signed certificate with Certificate Authority...

So I must find a way to say not check this.

Otherwise, it's working with curl. So if I can't fix this, I'll change requests mode and use curl instead.

Waiting from https://github.com/splitbrain/dokuwiki/issues/2008

algorys commented 7 years ago

@schmalgo Ok, I move to curl. Please try the new version of plugin and tell me if it display properly :wink:

algorys commented 7 years ago

@schmalgo I close the issue. Feel free to re-open if needed.