Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !8356

Closed
Created 10 years ago by Administrator@rootOwner
  • Report abuse
Report abuse

Web edit and HTTPS push work if multiple Rubies installed v3 [can be updated]

  • Overview 6
  • Commits 1
  • Changes 2

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.

Loading
Loading

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: TeatroIO

    I've prepared a stage. Click to open.

    By Administrator on 2014-11-19T18:26:36 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: jangrewe

    It would be great if this could be merged! I'm currently unable to accept any MRs because i need to have ruby-1.9.3 installed as the system ruby.

    By Administrator on 2015-02-09T13:21:28 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    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)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    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)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
Assign to
0 Reviewers
Request review from
Milestone
No milestone
None
None
Time tracking
1
Labels
Awaiting developer action/feedback
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
participants
Reference:
Source branch: github/fork/cirosantilli/multiple-rubies

    0 pending comments

Menu

Projects Groups Snippets
Help