Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to update time tracking to a self-hosted gitlab with nginx reverse proxy #121

Open
felipemm opened this issue Aug 5, 2020 · 3 comments

Comments

@felipemm
Copy link

felipemm commented Aug 5, 2020

Hi,

First of all, this a great project, I'll try my best to contribute as much as I can. I'm trying to using gtt on my hosted gitlab, but I keep getting an error when doing the sync:

$ gtt sync
📦 Fetching or creating issues & merge requests...... ✗) [---------------------------------------] 0% - 0m left
Error: Could not resolve issue 1 on "felipe.moreira/simple-node-js-react-npm-app"

I'm on windows, running it on git-bash, I can confirm that it works on my gitlab.com account, but on my hosted gitlab instance is not working. Worth mention that it's behind a nginx proxy, and it is using a context-path redirection. I tried to add "_verbose: true" to the config.yml, but it doesn't output anything.

I appreciate any help

Thanks in advance.
Felipe

@felipemm
Copy link
Author

felipemm commented Aug 5, 2020

config.yml

url: https://dev.logicinfo.com/git/api/v4
token: <redacted>
insecure: true
timezone: "America/Sao_Paulo"
_verbose: true
_checkToken: true

@felipemm
Copy link
Author

felipemm commented Aug 6, 2020

FYI, it seems the problem is for the URL encoded format of the project path against a self-hosted instance:
./src/models/issue.js:

    make(project, id, create = false) {
        let promise;

        if (create) {
            promise = this.post(`projects/${encodeURIComponent(project)}/issues`, {title: id});
        } else {
            promise = this.get(`projects/${encodeURIComponent(project)}/issues/${id}`);
        }

        promise.then(issue => {
            this.data = issue.body;
            return promise;
        });

        return promise;
    }

while this works fine on gitlab.com, it doesn't seem to work on self-hosted:

felipe.moreira@LA-PE02NTJG MINGW64 ~
$ curl --header "Private-Token: xxxxxx" "https://dev.logicinfo.com/git/api/v4/projects/felipe.moreira%2Fsimple-node-js-react-npm-app/issues/1" 
 {"error":"404 Not Found"}

using the project ID does work

@sk1ll10
Copy link

sk1ll10 commented Nov 25, 2021

same here, project names stopped working a few months ago, project id works, reports are also still working with project / group name.

self hosted gitlab instance (all settings are default as set by the omnibus installation instructions from gitlab)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants