epubjs
Version:
Render ePub documents in the browser, across many devices
128 lines (91 loc) • 6.39 kB
HTML
<html xmlns:epub="http://www.idpf.org/2007/ops" xmlns="http://www.w3.org/1999/xhtml"><head><title>Importing a file from Atlas 1</title><link rel="stylesheet" type="text/css" href="epub.css"/></head><body data-type="book"><section data-type="chapter" epub:type="chapter" data-pdf-bookmark="Chapter 13. Importing a file from Atlas 1"><div class="chapter" id="idp1668448">
<h1><span class="label">Chapter 13. </span>Importing a file from Atlas 1</h1>
<p>If you’re using the original, O’Reilly-only version of Atlas, here’s what you’ll need to do to import your projects. To do this, you’ll need to use git on the command line. If you need help with this, email atlas@oreilly.com and we can help you.</p>
<div data-type="note" epub:type="note">
<h1>Before you start...</h1>
<p>There are two things you need to do before you can migrate a repo over to Atlas 2. First, you must have an account. Email atlas@oreilly.com for details on getting a registration code. </p>
<p>Second, you must <span style="line-height: 1.5em;">add your SSH key. You can learn more about SSH on this GitHub article "</span><a data-original-title="" href="https://help.github.com/articles/generating-ssh-keys" style="line-height: 1.5em;" title="">Generating SSH Keys</a><span style="line-height: 1.5em;">.” To do this:</span></p>
<ol>
<li>Click on your profile page, which you access by clicking on your username at the upper right corner.</li>
<li>Add a title (this is just something to help you remember what key you used) and the key itself.</li>
</ol>
<p> </p>
<figure><div class="figure"><img alt="Alt Text" class="icontentsadd_ssh_keypng" src="assets/add_ssh_key.png"/>
<h6><span class="label">Figure 13-1. </span>You add your SSH key on your profile page.</h6>
<div> </div>
</div></figure>
</div>
<section data-type="sect1" data-pdf-bookmark="Get the git URL for the repo you want to move."><div class="sect1" id="idp1679216">
<h1>Get the git URL for the repo you want to move.</h1>
<p>The first step is to pull your project out of the old system. First, find the <span style="font-size: 17px; line-height: 1.5em;">remote URL on the “Admin” tab for your project in Atlas 1:</span></p>
<p> </p>
<figure><div class="figure"><img alt="Alt Text" class="icontentsatlas1_git_urlpng" src="assets/atlas1_git_url.png"/>
<h6><span class="label">Figure 13-2. </span>You’ll find the url for your repository on the “Admin” tab.</h6>
</div></figure>
</div></section>
<p> </p>
<section data-type="sect1" data-pdf-bookmark="Clone your original repo."><div class="sect1" id="idp1683904">
<h1>Clone your original repo.</h1>
<p>Once you’ve got the url, you’ll need to clone it to your machine using git on the command line. For example:</p>
<pre data-original-title="" data-type="programlisting" title="">
$ git clone https://odewahn%40oreilly.com@atlas-server.oreilly.com/git/1234000000486.git
Cloning into '1234000000486'...
Password for 'https://odewahn@oreilly.com@atlas-server.oreilly.com':
remote: Counting objects: 2831, done.
remote: Compressing objects: 100% (2535/2535), done.
remote: Total 2831 (delta 1388), reused 736 (delta 182)
Receiving objects: 100% (2831/2831), 20.34 MiB | 977 KiB/s, done.
Resolving deltas: 100% (1388/1388), done.
</pre>
<p>Note that your password is the same as your password when you log into Atlas.</p>
</div></section>
<p> </p>
<section data-type="sect1" data-pdf-bookmark="Create a “bare” repo in Atlas 2 to receive your project."><div class="sect1" id="idp1688144">
<h1>Create a “bare” repo in Atlas 2 to receive your project.</h1>
<p>Since you have an existing project, you’ll need to create what’s called a “bare” repo to recive your content and history. To do this:</p>
<ol>
<li>click the “New Project” button</li>
<li>Give your project a title and a description</li>
<li>Select “Bare” in the “Template” section </li>
<li>Click “Create!”</li>
</ol>
<figure><div class="figure"><img alt="Alt Text" class="icontentscreate_bare_repopng" src="assets/create_bare_repo.png"/>
<h6><span class="label">Figure 13-3. </span>Create a bare repo to accept your project</h6>
</div></figure>
<p> </p>
</div></section>
<section data-type="sect1" data-pdf-bookmark="Get the URL for your new repo from the “Settings” tab."><div class="sect1" id="idp1694496">
<h1>Get the URL for your new repo from the “Settings” tab.</h1>
<p>Once you’ve created the new repo, go to the “Settings” tab and copy its Git URL. </p>
<figure><div class="figure"><img alt="Alt Text" class="icontentsgit_url_from_settingspng" src="assets/git_url_from_settings.png"/>
<h6><span class="label">Figure 13-4. </span>This is an image caption</h6>
</div></figure>
</div></section>
<p> </p>
<section data-type="sect1" data-pdf-bookmark="Add a remote from your old repo to your new one and push."><div class="sect1" id="idp1698400">
<h1>Add a remote from your old repo to your new one and push.</h1>
<p>Once you have the new repos git url, return to the command line client and add a remote to the repo you want to move. Then, push it. </p>
<div data-type="warning" epub:type="warning">
<h1>Verifying the Atlas 2 Git Server’s identity</h1>
Note that you may be prompted to verify the identity of the Atlas 2 git server the first time you push. If so, just type “yes” at the prompt.</div>
<p>Your session should look something like this.</p>
<pre data-original-title="" data-type="programlisting" title="">
$ git remote add atlas2 git@54.84.204.203:odewahn/the-github-book.git
admins-air-5:1234000000486 odewahn$ git push atlas2 master
The authenticity of host '54.84.204.203 (54.84.204.203)' can't be established.
RSA key fingerprint is 35:4b:68:ee:42:aa:2a:b3:0e:0a:6f:87:0e:5e:b3:87.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '54.84.204.203' (RSA) to the list of known hosts.
Counting objects: 2831, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1329/1329), done.
Writing objects: 100% (2831/2831), 20.34 MiB | 1.30 MiB/s, done.
Total 2831 (delta 1388), reused 2831 (delta 1388)
To git@54.84.204.203:odewahn/the-github-book.git
* [new branch] master -> master
</pre>
<p> </p>
</div></section>
<p> </p>
</div></section></body></html>