Re: [git-users] Remote site setup

2016-06-02 Thread Konstantin Khomoutov
On Thu, 2 Jun 2016 06:52:33 -0700 (PDT)
Craig Boldy  wrote:

> Yes I have ssh access and git is also installed.

Well, OK, so there are two parts to this: a simple one and
a complex one.

The simple one is that serving Git repos on an SSH-enabled machine
is a no-brainer.  Basically you do:

  $ ssh me@myserver
  % mkdir -p ~/git/
  % git init --bare ~/git/repo.git
  % logout
  $ cd ~/devel/myproject
  $ git remote add prod ssh://me@myserver/~/git/repo.git
  $ git push prod master

The complex one is that the scenario I outlined above has two
properties:

* The remote repository is owned by your account on the server
  (and we explicitly initialized it under your home directory).

  Though real websites are typically served by a process using
  a dedicated system user account (such as "www-data" or "apache").

  Hence the files in your "/var/www/domainname.com/files" are typically
  owned by that user, and most of them are read-only for that user --
  except for "volatile" directories such as "tmp", "cache", "uploads"
  and so on.

  As you can see, pushing is not enough as you need to somehow gateway
  the data between the repository on the server and the place from
  where the webserves reads them.

* Deploying is harder than that anyway.

  Say, Git does not track file permissions (other than the executable
  bit) and often you need to have specific owner+group and permission
  bits on your files.

  Sometimes, you need to drop the caches created by your website engine.

  There's also the question of what to do with the files locally
  modified on the server when the new project state "arrives".

Hence I'd recommend you to deal with this problem piecemeal:

1) Create a bare repository on the server and play with pushing
   to it / fetching from it so that you understand how the whole
   thing works.

2) Google for the keywords git+push+deploy, inspect the opinions
   presented in various resources you'll find, and pick whatever
   works for you.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Remote site setup

2016-06-02 Thread Craig Boldy
Yes I have ssh access and git is also installed. 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Remote site setup

2016-06-02 Thread Craig Boldy
Sorry here's what I'm trying to achieve. 

I have a website on a remote Linux server that is located at 
/var/www/domainname.com/files here 
I have a program on my mac called Tower. I want to clone the above website 
to my mac. 
The Tower program I'm using on my mac is asking for a URL like this 
example.com/repository.git


-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Remote site setup

2016-06-02 Thread Konstantin Khomoutov
On Thu, 2 Jun 2016 05:39:55 -0700 (PDT)
Craig Boldy  wrote:

> Hello everyone. I'm wanting to start using git on my new projects but
> I'm a total noob. 
> So I have installed git on my Linux server my question is how do I
> create the repository of an existing site?

What does the "site" mean?  A web site?

> I CD to the root of the domain name

What the heck does this mean?

> but I don't quiet under stand the next steps. 
> I'm going to use a program called tower to clone my remote site and
> edit the files locally but it asks for the link to my repository.git 

Let's try to state precisely what do you waht using a series of simple
and short sentences.  I'll give it a go, and you provide your own
version, OK?

* I have a web site located in ... directory.
* I want to use Git to manage its contents.
  That is, when I push _somewhere_ from my development workstation
  that site gets updated.

Please try to formulate something along these lines.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.