jigit plug-in error when adding gitlab

Issue #15 wontfix
zhang minglong created an issue

I follow the official screenshots to fill in the corresponding information, there is an error: Error in the URL more than "/ api / v3 / projects /" These. Please see the screenshot.png

Comments (15)

  1. Dmitrii Apanasevich repo owner

    Hi!

    You are right, repository is the full project name and it shouldn't contain .git suffix.

    Could you take a look at JIRA log file? It should contain information and stacktrace related to this error.

  2. zhang minglong reporter

    This is jigit-plugen's log, I do not get it

    16-Nov-2017 18:07:58.878 WARNING [http-nio-8080-exec-13] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI http://192.168.220.202:8080/rest/jigit/1.0/repo/test, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.

  3. Dmitrii Apanasevich repo owner

    Let's try to call GitLab API with curl (https://curl.haxx.se/). You have to run two commands.

    The first:

    curl -i --header "PRIVATE-TOKEN: {YOUR_TOKEN_HERE}" "http://{YOUR_GITLAB_SITE_NAME_HERE}/api/v3/projects"
    

    And the second:

    curl -i --header "PRIVATE-TOKEN: {YOUR_TOKEN_HERE}" "http://{YOUR_GITLAB_SITE_NAME_HERE}/api/v3/projects/{YOUR_GROUP_NAME_HERE}%2Ffisheyetest/repository/branches/master"
    

    I bet that group name is minglongzhang ). So, your command will be something like this:

    curl -i --header "PRIVATE-TOKEN: it_is_a_secret" "http://gitlab****.com/api/v3/projects/minglongzhang%2Ffisheyetest/repository/branches/master"
    

    It's better to run commands from JIRA server if it is possible.

    What are the output of commands?

  4. zhang minglong reporter

    Thank you for always looking for a solution for me. These are logs:

    [root@localhost ~]# curl -i --header "PRIVATE-TOKEN:N2iPfkvu611bnXnDMygY" "http://gitlab.*.com/api/v3/projects" HTTP/1.1 200 OK Link: http://gitlab.****.com/api/v3/projects?archived=&order_by=created_at&page=1&per_page=20&simple=false&sort=desc; rel="first", http://gitlab.****.com/api/v3/projects?archived=&order_by=created_at&page=1&per_page=20&simple=false&sort=desc; rel="last" [{"id":267,"description":"","default_branch":"master","tag_list":[],"public":true,"archived":false,"visibility_level":20,"ssh_url_to_repo":"git@gitlab..com:minglong.zhang/fisheyepublic.git","http_url_to_repo":"http://gitlab..com/minglong.zhang/fisheyepublic.git","web_url":"http://gitlab..com/minglong.zhang/fisheyepublic","owner":{"name":"张明龙","username":"minglong.zhang","id":151,"state":"active","avatar_url":"http://cn.gravatar.com/avatar/af3adcce988072515cf190df801a3a78?s=80\u0026d=identicon","web_url":"http://gitlab..com/minglong.zhang"},"name":"fisheyepublic","name_with_namespace":"张明龙 / fisheyepublic","path":"fisheyepublic","path_with_namespace":"minglong.zhang/fisheyepublic","container_registry_enabled":true,"issues_enabled":true,"merge_requests_enabled":true,"wiki_enabled":true,"builds_enabled":true,"snippets_enabled":true,"created_at":"2017-11-14T06:52:57.231Z","last_activity_at":"2017-11-14T06:52:57.231Z","shared_runners_enabled":true,"lfs_enabled":true,"creator_id":151,"namespace":{"id":178,"name":"minglong.zhang","path":"minglong.zhang","kind":"user","full_path":"minglong.zhang","parent_id":null},"avatar_url":null,"star_count":0,"forks_count":0,"open_issues_count":0,"public_builds":true,"shared_with_groups":[],"only_allow_merge_if_build_succeeds":false,"request_access_enabled":false,"only_allow_merge_if_all_discussions_are_resolved":false,"permissions":{"project_access":{"access_level":40,"notification_level":3},"group_access":null}},{"id":266,"description":"fisheyetest","default_branch":"master","tag_list":[],"public":false,"archived":false,"visibility_level":0,"ssh_url_to_repo":"git@gitlab..com:minglong.zhang/fisheyetest.git","http_url_to_repo":"http://gitlab..com/minglong.zhang/fisheyetest.git","web_url":"http://gitlab..com/minglong.zhang/fisheyetest","owner":{"name":"张明龙","username":"minglong.zhang","id":151,"state":"active","avatar_url":"http://cn.gravatar.com/avatar/af3adcce988072515cf190df801a3a78?s=80\u0026d=identicon","web_url":"http://gitlab.***.com/minglong.zhang"},"name":"fisheyetest","name_with_namespace":"张明龙 / fisheyetest","path":"fisheyetest","path_with_namespace":"minglong.zhang/fisheyetest","container_registry_enabled":true,"issues_enabled":true,"merge_requests_enabled":true,"wiki_enabled":true,"builds_enabled":true,"snippets_enabled":true,"created_at":"2017-11-14T06:07:17.481Z","last_activity_at":"2017-11-17T01:08:34.780Z","shared_runners_enabled":true,"lfs_enabled":true,"creator_id":151,"namespace":{"id":178,"name":"minglong.zhang","path":"minglong.zhang","kind":"user","full_path":"minglong.zhang","parent_id":null},"avatar_url":null,"star_count":0,"forks_count":0,"open_issues_count":0,"public_builds":true,"shared_with_groups":[],"only_allow_merge_if_build_succeeds":false,"request_access_enabled":false,"only_allow_merge_if_all_discussions_are_resolved":false,"permissions":{"project_access":{"access_level":40,"notification_level":3},"group_access":null}}]

    [root@localhost ~]# curl -i --header "PRIVATE-TOKEN:N2iPfkvu611bnXnDMygY" "http://gitlab.****.com/api/v3/projects/minglong.zhang%2Ffisheyetest/repository/branches/master" HTTP/1.1 404 Not Found Server: nginx

  5. zhang minglong reporter

    I found a problem that an error will occur when the repository name contains ".". I did the test,Created two warehouses zml.easy and zmleasy 1) contain".": http://192.168.220.194/zmltest/zml.easy.git Wrong:http://45.78.30.202/20171120173413.png 2) Does not contain ".":http://192.168.220.194/zmltest/zmleasy.git success:http://45.78.30.202/20171120173436.png 20171120173413.png 20171120173436.png

  6. Log in to comment