Web edit and HTTPS push work if multiple Rubies installed v3 [can be updated]
Created by: cirosantilli
Would fail because Git modifies the hooks PATH, so for example the at /usr/bin/ruby could be called instead of the correct one at /usr/local/bin/ruby. Same for RVM.
Updates the reversed https://github.com/gitlabhq/gitlabhq/pull/8340 , same goals.
Requires: https://github.com/gitlabhq/gitlab-shell/pull/199/files
The new approach is to generate a file to be sourced with the PATH for gitlab shell on gitlab's startup, much like .gitlab_shell_secret
.
Old approach with env vars failed because SSH does not pass through GitLab so the vars were not being set.
Tests were removed since they were breaking something on the GitLab internal server. I can add again if desired.
Created by: TeatroIO
I've prepared a stage. Click to open.
By Administrator on 2014-11-19T18:26:36 (imported from GitLab project)
Created by: bb-generation
I just tried to apply this pull request (and https://github.com/gitlabhq/gitlab-shell/pull/199/files for gitlab-shell) and it works perfectly.
My way of trying was:
- stop gitlab
- create patch for both pull requests (clone repository,
git format-patch <sha1>
, change to installation,git apply <patch-file> --exclude <CHANGELOG VERSION|GITLAB_SHELL_VERSION>
) - start gitlab again
- push via ssh to a repository
- edit a file with the web viewer
And everything I tested worked as it should.
By Administrator on 2015-01-24T13:03:05 (imported from GitLab project)
Created by: jangrewe
I have just (manually) patched this into my running 7.7.2 instance, and it works perfectly fine!
You need to run the 'gitlab:shell:install' rake task first, so that the 'gitlab-shell/hooks/.env' file gets created - and then create the hook scripts, otherwise they're overwritten by the rake task.
Please please please merge this for 7.8.0!
By Administrator on 2015-02-12T17:12:12 (imported from GitLab project)
Created by: costela
Is there a reason why you can't simply use the contents of the GITLAB_PATH_OUTSIDE_HOOK env var that is already set when calling the hooks? This way you can have a simple wrapper (symlinked to all hooks), that does:
#!/bin/sh if [ ! -z "$GITLAB_PATH_OUTSIDE_HOOK" ]; then export PATH=$GITLAB_PATH_OUTSIDE_HOOK fi exec $0.rb "$@"
And you don't need the initializer or the hidden .env file. Or am I missing something obvious?
By Administrator on 2015-02-20T13:41:55 (imported from GitLab project)
Created by: cirosantilli
@costela let's move this to: https://github.com/gitlabhq/gitlab-shell/pull/199 Not using env vars because SSH won't see them.
By Administrator on 2015-02-20T19:19:30 (imported from GitLab project)