Bug 256574 - www/gitlab-pages: Not able to connect to gitlab API using secret
Summary: www/gitlab-pages: Not able to connect to gitlab API using secret
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-13 11:48 UTC by fulder
Modified: 2021-06-13 12:01 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (swills)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fulder 2021-06-13 11:48:15 UTC

    
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2021-06-13 11:58:31 UTC
^Triage: to submitter: we need more information.
Comment 2 fulder 2021-06-13 12:01:30 UTC
Hello,

I've been trying to install the "gitlab-ce" port which has a dependency to the gitlab-pages. 

After a fresh install I first got an error message about not present "shared/pages" folder:

level=fatal msg="could not change directory into pagesRoot" error="chdir shared/pages: no such file or directory"

Simply creating it in the ${gitlab_pages_dir} solved the problem, but then I instead got the warning:

level=warning msg="failed to initialize GitLab client for `-domain-config-source=auto`" error="GitLab API URL or API secret has not been provided"

Checking the gitlab-pages service I first noticed the startcmd function uses a variable not defined in the service file at all: ${gitlab_pages_args}. In order to be able to configure the pages daemon I set it to gitlab_pages_args="-config ${gitlab_pages_dir}/config.ini" and created this config file with the following content:

internal-gitlab-server=http://<MY_LOCAL_IP>
api-secret-key=/usr/local/www/gitlab-ce/.gitlab_shell_secret

restarting the service now instead gives me the error message:
level=fatal msg="Failed to load config" error="expected 32 bytes GitLab API secret but got 24 bytes

Am a bit lost how I solve this issue. Do you have any ideas or something that I've done really wrong here?

Best Regards,
Michal