nextcloud / nextcloud/integration_gitlab
Error getting OAuth access token. cURL error 7: Failed to connect
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 49
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I've set up a gitlab and nextcloud instance using docker-compose (behind a plesk proxy that redirect http to https) on my server recently and I am quite happy with them. However, I struggle a bit with the gitlab integration app in nextcloud.
Basically, I've followed the instructions and created an application on gitlab, called "Nextcloud" and with the following permissions

On nextcloud, I've filled the app ID and secret keys as informed, but when I try to connect my user, I get the following error message:
Error connecting to GitLab: Error getting OAuth access token. cURL error 7: Failed to connect to git.XXXX.com port 443: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://git.XXXX.com/oauth/token

I don't see much more information on the server logs or in the console so I'm a bit confused how to debug this issue.

As a test, I've tried manual curl calls to https://git.XXXX.com/api/v4/user in a terminal (at different locations) but get a 404 error, although I receive an response when I type this address in firefox directly. I can also see the request on the nginx logs from the gitlab docker:
192.168.128.1 - - [25/Aug/2021:22:30:12 +0000] "GET /oauth/authorize?client_id=XXX&redirect_uri=https%3A%2F%2Ffiles.XXXX.com%2Fapps%2Fintegration_gitlab%2Foauth-redirect&response_type=code&state=z160x7sz4&scope=api%20read_user%20read_api%20read_repository HTTP/1.0" 302 221 "" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0" -
Does anyone have an idea? Thank you!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the OAuth token request to https://git.XXXX.com/oauth/token and compare the reported cURL failure with the GitLab Docker and nginx logs. Reproduce the connection from the Nextcloud environment and determine which proxy or networking configuration prevents the request; done means the OAuth connection succeeds or the required deployment fix is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, javascript, nginx
- Domain
- authentication, infrastructure, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100