It all comes down to what protocol you're using to push.

If you have them attached via nfs, then you can just push with no problems.

Since you talk about ssh-agent I expect you're using the git protocol with
ssh.

What you need to do is set up the remote device to accept passwordless ssh
logins, You do that by using ssh-copy-id to get the remote machine to
recognise your key.


Notes from something a friend sent me:


crash course in ssh use:

You should generate an ssh key on each
computer you use and upload the public half to each computer you want
to talk to. Copying the same key about means that compromising one
machines compromises them all, and neither you nor anyone else can
control access on a per-machine basis.

Gernating a new key is dead easy:
ssh-keygen

and uploading the public half is similarly easy:
ssh-copy-id machine  (often need to give -i .ssh/id_dsa.pub if ssh-add
hasn't been run yet)

ssh keys ought to have a passphrase in them (so that stealing your
computer is not sufficient to give access everywhere). But that can be
annoying unless you use ssh-agent. Your distro almost certainly runs
this for you as part of your X-session so it's actually very eay to
use. You do ssh-add and it stays added until the session logs out. But
doing this is dull, so the clever thing is to add this to your
.bashrc:
alias ssh='ssh-add -l > /dev/null 2>&1 || ssh-add ; \ssh'
that adds it automatically the first time you connect to somewhere so
you only ever have to type your passphrase once.



On Mon, Oct 19, 2015 at 8:51 AM, liu wen <caonimagongl...@gmail.com> wrote:

> I'm using a fedora and ubuntu. Ubuntu as the server.
>
> On Sun, Oct 18, 2015 at 6:38 PM, Konstantin Khomoutov <
> flatw...@users.sourceforge.net> wrote:
>
>> On Sat, 17 Oct 2015 02:45:28 -0700 (PDT)
>> liu wen <caonimagongl...@gmail.com> wrote:
>>
>> > I have two laptop A and B, I want to create a shared repository on A,
>> > and I can clone/pull/push the shared repo on B.
>> > is it possible? if so, what are the clone command like?
>> >
>> > and do I need to enter password again and again? can I avoid entering
>> > password( like ssh-agent)?
>>
>> Too little information to provide you with a constructive answer.
>>
>> To begin with, what OSes those laptops are running?
>>
>> If it's Windows, you will be able to interoperate with A from B using
>> nothing more than a conventional Windows share created to host the
>> directory containing the repository.
>> Password management in this case depends on what class this Windows
>> network is (domain vs single-rank).
>>
>> If it's not Windows (or Windows and something else), things should
>> probably be set up differently, and password management would depend on
>> the setup selected.
>>
>
> --
> 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.
>

-- 
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.

Reply via email to