fritteli / gentoo-overlay

https://gittr.ch/linux/gentoo-overlay
GNU General Public License v2.0
24 stars 7 forks source link

GitLab & error 401 #6

Closed Kami-no closed 9 years ago

Kami-no commented 9 years ago

Have this problem - https://github.com/gitlabhq/gitlabhq/issues/8261

$ git push
Access denied.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Check result

Running /usr/share/gitlab-shell/bin/check
Check GitLab API access: FAILED. code: 401
gitlab-shell self-check failed
  Try fixing it:
  Make sure GitLab is running;
  Check the gitlab-shell configuration file:
  sudo -u git -H editor /usr/share/gitlab-shell/config.yml
  Please fix the error above and rerun the checks.

GitLab 7.5.3 + GitLab-Shell 2.3.1

Secret scripts are

ls /etc/gitlab-6/initializers/*secret*

Secret codes are

ls /opt/gitlab-6/.*secret*
ilyapoz commented 9 years ago

In the discussion of the upstream issue there was a proposed solution that worked for me. I had to do ln -sf /opt/gitlab-6/.gitlab_shell_secret /usr/share/gitlab-shell/. Those files were different for some reason, had to fix it manually.

fritteli commented 9 years ago

Hm, that's interesting. I'm having the same error, too, but I only noticed it today, not two days ago (when I updated gitlabhq). Your workaround works for me, too. Thank you!

I guess the problem is that my ebuild for gitlab-shell generates a random token that is stored under /usr/share/gitlab-shell/.gitlab_shell_secret. That worked fine when I installed gitlab-shell-2.3.1 for the first time and used it together with gitlabhq-7.4.3. Now, with gitlabhq-7.5.3, something must have changed, I guess.

I wonder how I can fix that in the ebuild?

fritteli commented 9 years ago

I've now added a new ebuild for gitlab-shell-2.3.1-r1 that doesn't generate the secret file, but symlinks it to /opt/gitlab-6/.gitlab_shell_secret, as suggested by @ilyapoz . This works for me, I hope it also works for you. I guess I need to add a dependency on >=gitlab-shell-2.3.1-r1 to gitlabhq, just to make sure it works for everybody. But I'd appreciate it if one of you could test it before I do so. Thanks for you help and support, guys!

Kami-no commented 9 years ago

Solution was right. Thx. Somehow I've missed files in /usr r1 ebuild resolves it.

fritteli commented 9 years ago

Okay, thanks! I added a new ebulild gitlabhq-7.5.3.1-r1 that depends on >=gitlab-shell-2.3.1-r1. I'm now closing this issue.