Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9025395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:15:44+00:00 2026-06-16T06:15:44+00:00

I’ve setup GitLab and am using it to host my Git repositories. Now what

  • 0

I’ve setup GitLab and am using it to host my Git repositories. Now what I’m trying to do is setup a post-receive hook so that I can develop in a folder called site_dev then push my changes so they’re automatically pulled into the site folder.

All morning I’ve been trying to get this hook to work however I’ve not had any luck executing any commands with GitLab running on Ubuntu Server, I know that the resque service is running and my workers are active.

Currently I have:

#!/bin/bash
LIVE="/var/www/teamnet"
# read oldrev newrev refname
# if [ $refname = "refs/heads/master" ]; then
  echo "===== DEPLOYING TO LIVE SITE ====="
  cd $LIVE || exit
  unset GIT_DIR
  git pull
  echo "===== DONE ====="
# fi

Attempting to pull my changes.

I’m not sure whether I’ve done something wrong here… All folders are in the same location /var/www/ on the same server. And yes, I have ran chmod +x on the hook.

Yes, I’ve ran git init --bare for the live folder and set the origin to the Git repository. I’m a little confused however as to where this hook should live, the live/dev folder?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:15:46+00:00Added an answer on June 16, 2026 at 6:15 am

    With Gitolite, which is used by GitLab, you must declare your post-receive hook as VREF (that I detail here).

    That supposes that your .gitolite.rc contains a LOCAL_CODE variable (see this script) in order to store your VREFs in a directory of your choice.

    Then you can associate that VREF (which is just an hook executable) to one or many repo in the gitolite.conf of the gitolite-admin repo. (manually, since there is no interface for that through GitLab)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an if statement in PHP that prevents a single post
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Let's say I'm outputting a post title and in our database, it's Hello Y’all
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am using JSon response to parse title,date content and thumbnail images and place
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.