try to use the plugin
Hi,
i ve done all the seetings needed in jira. The test connection worked, but when i reindex i got the message below (authorisation? should i generate the acess key by being admin ?) : <status><status-code>500</status-code><message>{"message":"401 Unauthorized"}</message><stack-trace>api.APIException: {"message":"401 Unauthorized"} at api.client.http.ApiHttpRequester.handleError(ApiHttpRequester.java:116) at api.client.http.ApiHttpRequester.parse(ApiHttpRequester.java:95) at api.client.http.ApiHttpRequester.withResultOf(ApiHttpRequester.java:65) at api.client.http.ApiHttpRequester.withResultOf(ApiHttpRequester.java:57) at jigit.client.gitlab.GitLabRepositoryAPI.branches(GitLabRepositoryAPI.java:58) at jigit.indexer.api.gitlab.GitLabAPIAdapter.branches(GitLabAPIAdapter.java:70) at jigit.indexer.BranchesApiCall.branches(BranchesApiCall.java:24) at jigit.indexer.RepoDataCleaner.clearRepoData(RepoDataCleaner.java:35) at jigit.services.JigitAdminRESTService.clearRepo(JigitAdminRESTService.java:206) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:83) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvo
thanks for your help
Comments (9)
-
repo owner -
Hi i never indexed before. i just put all the parameters in jira and that s all. i can see the tabpages on my issue on jira but i don't see the commits
as it doesn't seem to work i ve tried the indexation
thanks
-
repo owner Ok. I see. I think you've configured your repository to index all branches. Right?
Let's try to call GitLab API with curl (https://curl.haxx.se/). Here is the pattern:
curl -k -i --header "PRIVATE-TOKEN: {YOUR_TOKEN}" "{GITLAB_URL}/api/v3/projects/{REPO_NAME}/repository/branches"
Put correct values into placeholders. The only challenge is to replace symbol / in repo name with %2F. You'll get something like this (I used gitlab-org/gitlab-ce as a repository name):
curl -k -i --header "PRIVATE-TOKEN: my_own_secret_token" "https://gitlab.com/api/v3/projects/gitlab-org%2Fgitlab-ce/repository/branches"
Does this command returns something different from 401 Unauthorized?
Besides this, you can look for errors in JIRA log. I'm sure you'll find something related to Jigit.
-
Hi Dmitrii
i 've tried the curl but i think the problem is that our gitlab is in our private network and not accessible from the web ?
i'm at home an i can't access to the giblab repository. so even in, there is some kind of proxy to specify ?
thanks for your help
-
repo owner Hi,
You have to check whether GitLab is accessible from JIRA server, not from your home. Curl comend that I've provede above shuld return a list of branches. If it this call works then Jigit will work too.
I cannot help you with proxy setting or network setup.
What about JIRA logs?
-
repo owner Hi,
Do you have any news? Have you managed to check GitLab availability with curl?
-
Hi,
Unfortunalety, i didn’t figure out the solution yet.
Sam
-
repo owner Hi,
I cannot offer a solution because I haven't got details about the problem you've faced.
I need information from JIRA log. Grab it using keyword jigit.
Then, you've mentioned that pressing Test connection button you get a successful response, right? In this case please login into your JIRA server (via SSH or somehow else) and execute curl command I've gave you above.
Thats all at the moment.
I look forward to hearing from you.
-
repo owner - changed status to wontfix
- Log in to comment
Hi!
Problem looks strange. Had indexing been completed before you decided to re-index a repository? Did you see commits at tabpages or quantity of indexed commits at the settings page? Why did you decided to re-index a repository?