Git clone locally

Hi,

I follow the instructions below to set up a git repository with
gitosis on my home ubuntu server. I can connect to the repository
remotely perfectly and set up a new repository named My_Project. I
successfully push the content of My_Project to this repository using
the remote computer with an SSH key. Now I want to clone My_Project
locally onto another directory within the unbuntu server. How can I
do this? The instructions are only to clone remotely. It appears
that the clone command allows a “local” option but I haven’t been able
to get it to work.

Sorry for this seemingly off topic question. I use git in my rails
programming process and can’t find an active git support group.

Thanks.

Learn by Doing wrote:

Hi,

I follow the instructions below to set up a git repository with
gitosis on my home ubuntu server. I can connect to the repository
remotely perfectly and set up a new repository named My_Project. I
successfully push the content of My_Project to this repository using
the remote computer with an SSH key. Now I want to clone My_Project
locally onto another directory within the unbuntu server. How can I
do this? The instructions are only to clone remotely. It appears
that the clone command allows a “local” option but I haven’t been able
to get it to work.

http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way

Sorry for this seemingly off topic question. I use git in my rails
programming process and can’t find an active git support group.

As far as I know, the Git mailing list is quite active. You should
probably ask there.

Thanks.

Best,
–Â
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

On Mon, Jan 18, 2010 at 4:08 PM, Vincent P [email protected] wrote:

to get it to work.

http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way

Sorry for this seemingly off topic question. Â I use git in my rails
programming process and can’t find an active git support group.

From “git help clone”:

   --local, -l
       When the repository to clone from is on a local machine, this 

flag
bypasses normal “git aware” transport mechanism and clones
the
repository by making a copy of HEAD and everything under
objects
and refs directories. The files under .git/objects/ directory
are
hardlinked to save space when possible. This is now the
default
when the source repository is specified with /path/to/repo
syntax,
so it essentially is a no-op option. To force copying instead
of
hardlinking (which may be desirable if you are trying to make
a
back-up of your repository), but still avoid the usual “git
aware”
transport mechanism, --no-hardlinks can be used.


Curtis C.
[email protected]
home:http://curtiscooley.com
blog:http://ponderingobjectorienteddesign.blogspot.com

Leadership is a potent combination of strategy and character. But if
you must be without one, be without the strategy.
– H. Norman Schwarzkopf

2010/1/19 Easebus [email protected]:

Thanks all. Â I found out that I needed to use sudo before git in order for
the -local option to work in my case.

You should not need to use --local or sudo, just

git clone path/to/filename.git

Colin

Thanks all. I found out that I needed to use sudo before git in order
for
the -local option to work in my case.

BTW, what is the most active git support group? I looked on Google
group
but couldn’t find one. Thanks much.

Hi Colin,

I get this error if I just do git clone: fatal: failed to open /var/
gitosis/repositories/vincentProject.git/objects

But the following works: git clone git@localhost:vincentProject.git
clonedProject
That works after I add my public key to keydir folder under gitosis
and add my username to the members list for vincentProject in gitosis
config file. This is fine. But is there a better way?

One other problem: whenever I do a git pull, git asks me for my
passphrase for my key. Is there anyway for me to avoid this? I use
another account on a remote computer to do the pull and it works
without asking me for the passphrase of that account.

Thanks.

On Tue, Jan 19, 2010 at 1:38 AM, Easebus [email protected] wrote:

Thanks all. Â I found out that I needed to use sudo before git in order for
the -local option to work in my case.

BTW, what is the most active git support group? Â I looked on Google group
but couldn’t find one. Â Thanks much.

There IS a git users group on google groups:

http://groups.google.com/group/git-users


Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: Rick DeNatale - Developer - IBM | LinkedIn

On Tue, Jan 19, 2010 at 7:48 PM, Vincent P [email protected] wrote:

Vincent, you will need to use the following syntax instead:

git clone path/to/directory_name # This is the same as git clone -l path/to/directory_name.

For more information, I would recommend referencing the following web
sit
for git related
information:

http://git-scm.com

Good luck,

-Conrad

Hi Conrad,

I did use the syntax you suggested. Below is the error. Thanks.

~$ git clone /var/gitosis/repositories/vincentProject.git

Initialized empty Git repository in /home/master/vincentProject /.git/

fatal: failed to open
/var/gitosis/repositories/vincentProject.git/objects

I think that’s because the repo belongs to the git user under gitosis.
But
I did add my SSH key to keydir folder and add myself to the members list
for
this project. I don’t know why git still prevents me from cloning.
That’s
why I had to use: git clone git@localhost:vincentProject.git
clonedProject.
This works. The only drawback with this method is that it asks me for
my
passphrase for my SSH key every time.

Thanks.

Vincent.

From: [email protected]
[mailto:[email protected]] On Behalf Of Conrad T.
Sent: Tuesday, January 19, 2010 8:15 PM
To: [email protected]
Subject: Re: [Rails] Re: git clone locally

On Tue, Jan 19, 2010 at 7:48 PM, Vincent P [email protected] wrote:

Hi Colin,

I get this error if I just do git clone: fatal: failed to open /var/
gitosis/repositories/vincentProject.git/objects

But the following works: git clone git@localhost:vincentProject.git
clonedProject
That works after I add my public key to keydir folder under gitosis
and add my username to the members list for vincentProject in gitosis
config file. This is fine. But is there a better way?

One other problem: whenever I do a git pull, git asks me for my
passphrase for my key. Is there anyway for me to avoid this? I use
another account on a remote computer to do the pull and it works
without asking me for the passphrase of that account.

Thanks.

On Jan 19, 1:25 am, Colin L. [email protected] wrote:

2010/1/19 Easebus [email protected]:

Thanks all. I found out that I needed to use sudo before git in order
for
the -local option to work in my case.

You should not need to use --local or sudo, just

git clone path/to/filename.git

Colin

Vincent, you will need to use the following syntax instead:

git clone path/to/directory_name # This is the same as git clone -l path/to/directory_name.

For more information, I would recommend referencing the following web
sit
for git related

information:

http://git-scm.com

Good luck,

-Conrad


You received this message because you are subscribed to the Google
Groups
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]
mailto:[email protected] .
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

On Wed, Jan 20, 2010 at 11:24 AM, Easebus [email protected] wrote:

Initialized empty Git repository in /home/master/vincentProject /.git/

fatal: failed to open /var/gitosis/repositories/vincentProject.git/objects

I think that’s because the repo belongs to the git user under gitosis.
But I did add my SSH key to keydir folder and add myself to the members list
for this project. I don’t know why git still prevents me from cloning.
That’s why I had to use: git clone git@localhost:vincentProject.gitclonedProject. This works. The only drawback with this method is that it
asks me for my passphrase for my SSH key every time.

Vincent, if you’re using SSH, then you should also be able to access the
repository as
follows:

got clone git@localhost/repositories/vincentProject.git

Next, you cannot use a local method of cloning your repository because
you’re using
SSH. Thus, you cannot do

git clone /path/to/repositories/vincentProject

However, you may do this if the current user is ‘git’

git clone /repositories/vincentProject.git

Furthermore, you’ll need to learn more about the tools you’re using
before
you put them into
practice. For example, you should have been fairly comfortable with git
basics before adding
a tool like gitosis to the mix. There are many resources to get up to
speed
with git which include
screencasts. Lastly, I haven’t used gitosis so I will not be able to
help
you here.

Good luck,

-Conrad

Thanks.

Vincent.

Vincent, you might want to learn more about the IDE

On Wed, Jan 20, 2010 at 1:44 PM, Marnen Laibow-Koser
[email protected]wrote:

Conrad T. wrote:

On Wed, Jan 20, 2010 at 11:24 AM, Easebus [email protected] wrote:

Initialized empty Git repository in /home/master/vincentProject /.git/
[…]

Folks, this is not the Git list. Please take this discussion somewhere
where it is on topic.

I follow the list pretty closely and there have been a lot of off topic
discussions in the past
from database comparison to whether one should choose a Mac to what’s
the
best editor. The
community has embraced Git as the source code control system. Thus, I
feel
that it’s reasonable
to assist a fellow Rails developer by simply answering the question.
Yes,
it would be great to
direct questions/answers/comments to correct group or mailing list but
that’s not always the case
in practice.

-Conrad

Conrad T. wrote:

On Wed, Jan 20, 2010 at 11:24 AM, Easebus [email protected] wrote:

Initialized empty Git repository in /home/master/vincentProject /.git/
[…]

Folks, this is not the Git list. Please take this discussion somewhere
where it is on topic.

Best,
–Â
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

On Wed, Jan 20, 2010 at 3:27 PM, Marnen Laibow-Koser
[email protected]wrote:

Yes – for Rails development. A general question on whether to choose a

to assist a fellow Rails developer by simply answering the question.

Sure it is. And if it’s not, that’s a mistake.

-Conrad

Best,

In short, you have the right to read or not read a thread. With that
being
said, this discussion
is closed.

-Conrad

Conrad T. wrote:

On Wed, Jan 20, 2010 at 1:44 PM, Marnen Laibow-Koser
[email protected]wrote:

Conrad T. wrote:

On Wed, Jan 20, 2010 at 11:24 AM, Easebus [email protected] wrote:

Initialized empty Git repository in /home/master/vincentProject /.git/
[…]

Folks, this is not the Git list. Please take this discussion somewhere
where it is on topic.

I follow the list pretty closely and there have been a lot of off topic
discussions in the past
from database comparison to whether one should choose a Mac to what’s
the
best editor.

Yes – for Rails development. A general question on whether to choose a
Mac would not be appropriate here. Neither would basic Mac OS
instruction.

The
community has embraced Git as the source code control system. Thus, I
feel

But this is not about what you or I feel.

that it’s reasonable
to assist a fellow Rails developer by simply answering the question.

Yup. A simple answer and/or a pointer to the Git list. The OP is
asking a Git question that isn’t related to Rails. It’s off topic here.
Please take the discussion elsewhere.

Yes,
it would be great to
direct questions/answers/comments to correct group or mailing list but
that’s not always the case
in practice.

Sure it is. And if it’s not, that’s a mistake.

-Conrad

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Conrad T. wrote:

On Wed, Jan 20, 2010 at 3:27 PM, Marnen Laibow-Koser
[email protected]wrote:

Yes – for Rails development. A general question on whether to choose a

to assist a fellow Rails developer by simply answering the question.

Sure it is. And if it’s not, that’s a mistake.

-Conrad

Best,

In short, you have the right to read or not read a thread.

If that were the whole story, there would never be any need to declare a
topic for a discussion group.

With that
being
said, this discussion
is closed.

That’s not your decision. Or mine.

-Conrad

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Hi Conrad,

Thank you very much for your thorough explanation. I submitted my
question
to [email protected] but it appears that that group is
moderated,
my question took days to be posted, and the traffic was low. I needed
gitosis to collaborate with another Rails developer (we are
uncomfortable
with Github confidentiality protection). Your prompt help saved the
day. I
find the responsiveness of this Rails Talk group a compelling reason to
become a Rails developer.

Thanks,

Vincent.

From: [email protected]
[mailto:[email protected]] On Behalf Of Conrad T.
Sent: Wednesday, January 20, 2010 1:38 PM
To: [email protected]
Subject: Re: [Rails] Re: git clone locally

On Wed, Jan 20, 2010 at 11:24 AM, Easebus [email protected] wrote:

Hi Conrad,

I did use the syntax you suggested. Below is the error. Thanks.

~$ git clone /var/gitosis/repositories/vincentProject.git

Initialized empty Git repository in /home/master/vincentProject /.git/

fatal: failed to open
/var/gitosis/repositories/vincentProject.git/objects

I think that’s because the repo belongs to the git user under gitosis.
But
I did add my SSH key to keydir folder and add myself to the members list
for
this project. I don’t know why git still prevents me from cloning.
That’s
why I had to use: git clone git@localhost:vincentProject.git
clonedProject.
This works. The only drawback with this method is that it asks me for
my
passphrase for my SSH key every time.

Vincent, if you’re using SSH, then you should also be able to access the
repository as

follows:

got clone git@localhost/repositories/vincentProject.git

Next, you cannot use a local method of cloning your repository because
you’re using

SSH. Thus, you cannot do

git clone /path/to/repositories/vincentProject

However, you may do this if the current user is ‘git’

git clone /repositories/vincentProject.git

Furthermore, you’ll need to learn more about the tools you’re using
before
you put them into

practice. For example, you should have been fairly comfortable with git
basics before adding

a tool like gitosis to the mix. There are many resources to get up to
speed
with git which include

screencasts. Lastly, I haven’t used gitosis so I will not be able to
help
you here.

Good luck,

-Conrad

Thanks.

Vincent.

Vincent, you might want to learn more about the IDE

From: [email protected]
[mailto:[email protected]] On Behalf Of Conrad T.
Sent: Tuesday, January 19, 2010 8:15 PM

To: [email protected]

Subject: Re: [Rails] Re: git clone locally

On Tue, Jan 19, 2010 at 7:48 PM, Vincent P [email protected] wrote:

Hi Colin,

I get this error if I just do git clone: fatal: failed to open /var/
gitosis/repositories/vincentProject.git/objects

But the following works: git clone git@localhost:vincentProject.git
clonedProject
That works after I add my public key to keydir folder under gitosis
and add my username to the members list for vincentProject in gitosis
config file. This is fine. But is there a better way?

One other problem: whenever I do a git pull, git asks me for my
passphrase for my key. Is there anyway for me to avoid this? I use
another account on a remote computer to do the pull and it works
without asking me for the passphrase of that account.

Thanks.

On Jan 19, 1:25 am, Colin L. [email protected] wrote:

2010/1/19 Easebus [email protected]:

Thanks all. I found out that I needed to use sudo before git in order
for
the -local option to work in my case.

You should not need to use --local or sudo, just

git clone path/to/filename.git

Colin

Vincent, you will need to use the following syntax instead:

git clone path/to/directory_name # This is the same as git clone -l path/to/directory_name.

For more information, I would recommend referencing the following web
sit
for git related

information:

http://git-scm.com

Good luck,

-Conrad


You received this message because you are subscribed to the Google
Groups
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]
mailto:[email protected] .
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


You received this message because you are subscribed to the Google
Groups
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]
mailto:[email protected] .
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.