Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need to setup either the git daemon or ssh</p> <p>Since you want to clone from Mac, </p> <p><strong>First way</strong> - Using git daemon, a lightweight server</p> <ol> <li><p><strong>Mac:</strong> Head to your repository on mac, ensure it is bare, i.e when you run <code>ls -lrt</code>, it should look like</p> <pre><code>drwxr-xr-x 4 fooo admin 136 21 Dec 12:26 refs -rw-r--r-- 1 fooo admin 205 21 Dec 12:26 packed-refs drwxr-xr-x 4 fooo admin 136 21 Dec 12:26 objects drwxr-xr-x 3 fooo admin 102 21 Dec 12:26 info drwxr-xr-x 12 fooo admin 408 21 Dec 12:26 hooks -rw-r--r-- 1 fooo admin 73 21 Dec 12:26 description -rw-r--r-- 1 fooo admin 161 21 Dec 12:26 config drwxr-xr-x 2 fooo admin 68 21 Dec 12:26 branches -rw-r--r-- 1 fooo admin 23 21 Dec 12:26 HEAD </code></pre> <p>If it does not, then do step 2</p></li> <li><p>Run <code>git clone --bare /&lt;Path to your repository&gt;</code></p></li> <li><p>Create an empty file git-daemon-export-ok: <code>echo '' &gt; git-daemon-export-ok</code></p></li> <li><p>Run </p> <pre><code>git daemon --base-path=`pwd` --verbose --port=9418 </code></pre></li> <li><p><strong>Linux:</strong> Clone your git repository: </p> <pre><code>git clone git://&lt;mac os ip address&gt; &lt;name of folder you want to check out to&gt; </code></pre> <p>example - </p> <pre><code>git clone git://192.168.1.2 javaAddOn </code></pre></li> </ol> <p><strong>Second way</strong> - Using ssh - [Slightly harder]</p> <ol> <li><p><strong>MAC:</strong> In Mac head to System Preferences => Remote Login</p></li> <li><p>Open terminal to create ssh keys:</p> <pre><code>cd ~ ssh-keygen -t rsa #Press enter for all default values cd .ssh cat id_rsa.pub &gt;&gt; authorized_keys </code></pre></li> <li><p><strong>LINUX:</strong> Perform the same steps as in step 2, skipping creating the authorized_keys</p></li> <li><p>Copy the authorized keys from the mac into Ubuntu under ~/.ssh/ - </p> <pre><code>scp &lt;macuser&gt;@&lt;macip&gt;:/Users/&lt;macuser&gt;/.ssh/authorized_keys ~/.ssh/ </code></pre></li> <li><p>Check to ensure you can ssh from Linux. <code>ssh &lt;macuser&gt;@&lt;macip&gt;</code></p></li> <li><p>If step 5 is successful you can use git. </p> <pre><code>git clone &lt;macuser&gt;@&lt;macip&gt;:&lt;Full Path of the repository location </code></pre></li> </ol> <p>example</p> <pre><code> git clone pm@192.168.1:/Users/pm/repositories_git/JavaTasks </code></pre> <p>Finally, if you want to develop in both Mac and Linux and commit in both, you have to use the second way and then push and pull changes. I have exactly the same setup, but usually I only develop in Linux and then push the changes into Mac.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload