Sharath,
As far as I know you can have your repository anywhere, the only restriction
would be that the production (web) server be able to log into you local
machine to do a git/svn pull.

The 'normal' process would be to host the repo either on github, the client
server or your own (external) server.

To use on your own server or the production server do the following:

   - install git on the server
   - then decide where you want to store repositories, ie ~/repos
   - then create a .git file like so mkdir ~/repos/<some_app_name>.git and
   cd into that directory
   - initialize an empty repo with git --bar init
   - exit the server
   - on your local machine go to the app directory and enter git remote add
   origin ssh://<domain_name_or_ip_address>/<path_to_repos>/<repo_name>.git
   - and then git push origin master

This assumes you've already initialized a git repo for your local app.

Again, after this you just need to make sure the production server can
access the server with the remote git repository.

To learn git better just google and you'll find loads of info.


    *Greg Pederson* Founder and Technical Director 407.385.0098 office
888.308.9695
toll free www.NsightDevelopment.com <http://www.nsightdevelopment.com>
Contact Me <http://www.linkedin.com/in/gregpederson>
LinkedIn<http://www.linkedin.com/in/gregpederson>
<http://www.facebook.com/gregpederson>
Facebook<http://www.facebook.com/gregpederson>
<http://twitter.com/gregpederson> Twitter <http://twitter.com/gregpederson>
Signature powered by
<http://www.wisestamp.com/email-install?utm_source=extension&utm_medium=email&utm_campaign=footer>
WiseStamp<http://www.wisestamp.com/email-install?utm_source=extension&utm_medium=email&utm_campaign=footer>



On Thu, Mar 10, 2011 at 11:00 AM, sharath chander punthambekar <
[email protected]> wrote:

> Hello Friends
>
> I am a newbie to rails but picking up fast.
>
> I need to know if we can have repository in local machine for capistrano to
> work.
>
> I am not yet familiar with SVN & GIT & I want to quickly check if my sample
> app is working on production server.
>
> Regards
> Sharath
>
>
>
> On Wed, Mar 9, 2011 at 8:20 PM, <[email protected]>wrote:
>
>>   Today's Topic Summary
>>
>> Group: http://groups.google.com/group/capistrano/topics
>>
>>    - trying to run cap deploy:update and getting "no such file or
>>    directory" error on server or 
>> github<https://mail.google.com/mail/html/compose/static_files/blank_quirks.html#12e9b1ae7d7714ad_group_thread_0>[4
>>  Updates]
>>    - New resource for deploying WordPress with 
>> Capistrano<https://mail.google.com/mail/html/compose/static_files/blank_quirks.html#12e9b1ae7d7714ad_group_thread_1>[2
>>  Updates]
>>
>>  Topic: trying to run cap deploy:update and getting "no such file or
>> directory" error on server or 
>> github<http://groups.google.com/group/capistrano/t/18d7e1784294105a>
>>
>>    Dean <[email protected]> Mar 08 08:59AM -0800 
>> ^<https://mail.google.com/mail/html/compose/static_files/blank_quirks.html#12e9b1ae7d7714ad_digest_top>
>>
>>    Hi:
>>
>>    I'm completely new to using capistrano and I hope to soon deploy my
>>    first rails application to production. I'm having trouble getting
>>    cap:deploy going. Here's my scenario:
>>
>>    development machine: windows box running XP Professional. Stuck behind
>>    our corporate firewall. HTTP_PROXY is set correctly, so that I can
>>    push/pull to my private repo on github.
>>
>>    rails -v: 2.3.5
>>    git --version: 1.7.2.3.msysgit.0
>>    cap --version: v2.5.19
>>
>>    remote (deploy) server: linux box running Ubunto 10.04 Server (also
>>    behind our corporate firewall)
>>    rails version on server: 2.3.5
>>    git version on server: 1.7.1
>>    capistrano version on server: v2.5.19
>>
>>    deploy.rb on local (development) machine:
>>
>>    http://pastie.org/1647866
>>
>>    I've successfully run cap deploy:setup.
>>    When I run cap deploy:check, I get the success message: "You appear to
>>    have all necessary dependencies installed."
>>
>>    But when I try to run cap deploy:update I get the following error
>>    output:
>>
>>    http://pastie.org/1647904
>>
>>    My diagnosis is that when capistrano gets to my server, and tries to
>>    send an ls-remote command to my repo on github, it can't connect due
>>    to an authorization or proxy firewall problem.
>>
>>    When I login to my remote server as the deploy user, and attempt to
>>    issue the same command issued by capistrano at the command line:
>>
>>    $ /usr/bin/git ls-remote [email protected]:git_username/app_name.git
>>    master
>>
>>    I get the error message:
>>
>>    ssh: connect to host github.com port 22: Connection timed out
>>    fatal: the remote end hung up unexpectedly
>>
>>    When I try to ssh -v github.com, I get basicaly the same error:
>>    connection timed out.
>>
>>    When I try to clone my github repository locally on the remote server,
>>    the process seems to proceed, but terminates with a 401 error:
>>
>>    $ git clone http://github.com/git_username/app_name.git
>>    Initalized empty Git repository in home/username/rails_projects/
>>    app_name/.git/
>>    error: The requested URL returned error: 401 while accessing
>>    http://github.com/git_username/app_name.git/info/refs
>>    fatal: HTTP request failed
>>
>>    My copy of git on the remote server is installed at /usr/bin/git.
>>
>>    My .gitconfig file on the remote server contains this code:
>>
>>    [http]
>>    proxy = http://proxy_username:proxy_password@proxy_server.com:port
>>
>>    Any suggestions on what I should try next?
>>
>>    Thanks,
>>
>>    Dean Richardson
>>    Molex.com
>>
>>
>>
>>
>>    Lee Hambley <[email protected]> Mar 08 08:20PM +0100 
>> ^<https://mail.google.com/mail/html/compose/static_files/blank_quirks.html#12e9b1ae7d7714ad_digest_top>
>>
>>    Line #3 of your deploy.rb instructs Git to use SSH, which is
>>    apparently
>>    blocked by your firewall, so the HTTP proxy you have configured in
>>    your
>>    .gitconfig isnt' taking effect. See
>>
>>    
>> http://www.kernel.org/pub/software/scm/git/docs/git-clone.html#_git_urls_a_id_urls_a
>>
>>    - Lee
>>
>>
>>
>>
>>    Christian Eager <[email protected]> Mar 08 03:13PM -0500 
>> ^<https://mail.google.com/mail/html/compose/static_files/blank_quirks.html#12e9b1ae7d7714ad_digest_top>
>>
>>    Try:
>>
>>    :repository, "https://github.com/username/my_app_name.git";
>>
>>    in deploy.rb, and in your remote .gitconfig:
>>
>>    [https]
>>    proxy = http://proxy_username:proxy_password@proxy_server.com:
>>    port
>>
>>
>>    git@github... isn't using the same protocol as ssh://, but the
>>    underlying
>>    issue is the same. To get around firewalls using ssh, I like corkscrew
>>    [1]
>>    (requires Cygwin on Windows).
>>
>>
>>    The reason why
>>
>>    $ git clone http://github.com/git_username/app_name.git
>>    > error: The requested URL returned error: 401 while accessing
>>    > http://github.com/git_username/app_name.git/info/refs
>>    > fatal: HTTP request failed
>>
>>
>>    failed is probably because your repository is set to private, and git
>>    tried
>>    to authenticate using your local username (deploy?). If you try
>>
>>    git clone http://[email protected]/git_username/app_name.git<
>>    http://github.com/git_username/app_name.git>
>>    (or
>>    even better, https://...)
>>
>>    that should work remotely, assuming you add https.proxy to your remote
>>    .gitconfig.
>>
>>
>>    Best,
>>    Chris
>>
>>
>>    [1] http://www.agroman.net/corkscrew/
>>
>>    On Tue, Mar 8, 2011 at 11:59 AM, Dean <[email protected]> wrote:
>>
>>
>>
>>
>>
>>    Lee Hambley <[email protected]> Mar 08 09:18PM +0100 
>> ^<https://mail.google.com/mail/html/compose/static_files/blank_quirks.html#12e9b1ae7d7714ad_digest_top>
>>
>>
>>    > git@github... isn't using the same protocol as ssh://
>>
>>
>>    Yes, it is, but your advice to use the http:// scheme is right, I had
>>    hoped
>>    that was implicit in my answer, perhaps leading him to check the docs!
>>
>>    - Lee
>>
>>
>>
>>  Topic: New resource for deploying WordPress with 
>> Capistrano<http://groups.google.com/group/capistrano/t/c9d533e10887d388>
>>
>>    Faun <[email protected]> Mar 08 10:51AM -0800 
>> ^<https://mail.google.com/mail/html/compose/static_files/blank_quirks.html#12e9b1ae7d7714ad_digest_top>
>>
>>    Here's an introductory article I wrote about deploying WordPress with
>>    Capistrano:
>>
>>
>>    
>> http://www.tractionco.com/blog/95-deploying-wordpress-with-capistrano-and-svn
>>
>>    Any suggestions/comments welcome.
>>    Faun
>>
>>
>>
>>
>>    Lee Hambley <[email protected]> Mar 08 08:21PM +0100 
>> ^<https://mail.google.com/mail/html/compose/static_files/blank_quirks.html#12e9b1ae7d7714ad_digest_top>
>>
>>    Did you also add this to the Capistrano wiki at github?
>>
>>    - Lee
>>
>>
>>
>>
>> --
>> * You received this message because you are subscribed to the Google
>> Groups "Capistrano" group.
>> * To post to this group, send email to [email protected]
>> * To unsubscribe from this group, send email to
>> [email protected] For more options, visit this
>> group at http://groups.google.com/group/capistrano?hl=en
>
>
>
>
> --
> With Best Regards
>
> Sharath
> *
> "Imagination is everything. It is the
> preview of life's coming attractions"
> - Albert Einstein*
>
>  --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/capistrano?hl=en

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to