git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Location limits on development, staging and production environments

From
HH <agents@meddatainc.com>
Date
Jan 29, 2018, 19:08 UTC
Message-ID
<baf15388-adb4-ddce-889f-3e71b1574044@meddatainc.com>
I am a newcomer to git looking to set up a web development environment where individual computers are used for development, the development.git, staging.git and production.git repositories are stored on an external server reachable by password-less ssh and the staging and production websites are on yet another server, also reachable by password-less ssh from the git-server (and the development machines).
Locating the three git repositories on an external server works fine but I have not been able to have the staging and production deployment files on another server. I believe this is what is referred by GIT_WORK_TREE and based on what I found on the web I created a post-receive hook of staging.git with the two lines:

#!/bin/sh GIT_WORK_TREE=user@1.2.3.4:/var/www/html/dev.whatever git checkout -f master

I believe this should deploy the files from the development work tree.
The above, however, fails. Should it work? I am running git 1.7.1 on CentOS 6.
Next: Bryan Turner
Message 1 of 4 in “Location limits on development, staging and production environments”
  1. HJan 29, 2018
  2. Bryan TurnerJan 29, 2018
  3. HJan 30, 2018
  4. HJan 31, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.