Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate Chapter6 "GitHub" #10

Merged
merged 15 commits into from
Dec 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 42 additions & 0 deletions book/06-github/1-github.asc
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,51 @@
== GitHub

(((GitHub)))
//////////////////////////
GitHub is the single largest host for Git repositories, and is the central point of collaboration for millions of developers and projects.
A large percentage of all Git repositories are hosted on GitHub, and many open-source projects use it for Git hosting, issue tracking, code review, and other things.
So while it's not a direct part of the Git open source project, there's a good chance that you'll want or need to interact with GitHub at some point while using Git professionally.
//////////////////////////
GitHub は世界最大の Git リポジトリホスティングサービスで、何百万もの開発者やプロジェクトが集う、共同作業の場になっています。
世の中の Git リポジトリの多くが GitHub に置かれており、多くのオープンソースプロジェクトが、
Git リポジトリ以外にも、課題追跡やコードレビューなどに GitHub を利用しています。
Git そのものとは直接関係ありませんが、Git を使っていれば、遅かれ早かれ GitHub を利用したくなる(あるいはそうせざるを得なくなる)でしょう。
/////
↑多少意訳気味
/////

//////////////////////////
This chapter is about using GitHub effectively.
We'll cover signing up for and managing an account, creating and using Git repositories, common workflows to contribute to projects and to accept contributions to yours, GitHub's programmatic interface and lots of little tips to make your life easier in general.
//////////////////////////
本章では、GitHub を有効活用する方法を説明します。
アカウントの取得や管理、Git リポジトリの作成と利用、
プロジェクトに貢献したり自分のプロジェクトへの貢献を受け入れたりするときの一般的なワークフロー、
GitHubをプログラマティックに利用するためのインターフェイスなどのほかにも、
GitHubをうまく使っていくためのさまざまなヒントを紹介します。

//////////////////////////
If you are not interested in using GitHub to host your own projects or to collaborate with other projects that are hosted on GitHub, you can safely skip to <<_git_tools>>.
//////////////////////////
GitHub に自分のプロジェクトを置いたり、GitHub にある他のプロジェクトで共同作業をしたりといったことに興味がないかたは、
本章を読み飛ばして <<_git_tools>> に進んでもかまいません。

[WARNING]
//////////////////////////
.Interfaces Change
====
It's important to note that like many active websites, the UI elements in these screenshots are bound to change over time. Hopefully the general idea of what we're trying to accomplish here will still be there, but if you want more up to date versions of these screens, the online versions of this book may have newer screenshots.
====
//////////////////////////
.インターフェイスは変わるもの
====
GitHub に限ったことではありませんが、本章のスクリーンショットで示している UI は、将来的に変わる可能性があります。
本章で紹介しようとしている考えかたはそれでも伝わるでしょうが、
最新版のスクリーンショットを見たい場合は、オンライン版を見たほうがいいでしょう。
====
/////
↑ たぶん紙の書籍向けの警告を意図しているようなので、ばっさりカットしてしまってもいいかも。
/////

include::sections/1-setting-up-account.asc[]

Expand All @@ -27,8 +58,19 @@ include::sections/4-managing-organization.asc[]

include::sections/5-scripting.asc[]

//////////////////////////
=== Summary
//////////////////////////
=== まとめ

//////////////////////////
Now you're a GitHub user.
You know how to create an account, manage an organization, create and push to repositories, contribute to other peoples projects and accept contributions from others.
In the next chapter, you'll learn more powerful tools and tips for dealing with complex situations, which will truly make you a Git master.
//////////////////////////
これであなたも GitHub ユーザーです。
アカウントの作りかたもわかったし、
組織を管理したりリポジトリを作ったり、リポジトリにプッシュしたり、
他のプロジェクトに貢献したり、他のユーザーからの貢献を受け入れたりする方法も覚えました。
次の章では、さらに強力なツールやヒントについて学びます。
複雑な状況に対処できるようになり、本当の意味での Git の達人になれることでしょう。
140 changes: 138 additions & 2 deletions book/06-github/sections/1-setting-up-account.asc
Original file line number Diff line number Diff line change
@@ -1,86 +1,222 @@
//////////////////////////
=== Account Setup and Configuration
//////////////////////////
=== アカウントの準備と設定

(((GitHub, user accounts)))
//////////////////////////
The first thing you need to do is set up a free user account.
Simply visit https://github.com[], choose a user name that isn't already taken, provide an email address and a password, and click the big green ``Sign up for GitHub'' button.
//////////////////////////
まずやるべきことは、ユーザーアカウントの作成です。無料で作れます。
https://github.com[] を開いて、他の人が使っていないユーザー名を選び、メールアドレスとパスワードを入力したら、あとは ``Sign up for GitHub'' という大きな緑色のボタンを押すだけです。

//////////////////////////
.The GitHub sign-up form.
image::images/signup.png[The GitHub sign-up form.]
//////////////////////////
.GitHub のサインアップフォーム
image::images/signup.png[GitHub のサインアップフォーム]

//////////////////////////
The next thing you'll see is the pricing page for upgraded plans, but it's safe to ignore this for now.
GitHub will send you an email to verify the address you provided.
Go ahead and do this, it's pretty important (as we'll see later).
//////////////////////////
その次に出てくるのは、有償プランへのアップグレードについての説明です。
とりあえずは無視してもかまいません。
先ほど入力したメールアドレスが正しいことを確認するために、GitHubからのメールが届きます。
メールの指示に従ってください。後で見るとおり、これはとても需要です。

[NOTE]
//////////////////////////
====
GitHub provides all of its functionality with free accounts, with the limitation that all of your projects are fully public (everyone has read access).
GitHub's paid plans include a set number of private projects, but we won't be covering those in this book.
====
//////////////////////////
====
無償版のアカウントで、GitHubのすべての機能が使えます。
ただし、すべてのプロジェクトを公開しなければいけない(誰でも読めるようにしなければいけない)という制約があります。
GitHubの有償プランは、プライベートなプロジェクトを所定の数だけ作れるようになっています。
しかし本書では、この機能については扱いません。
====

//////////////////////////
Clicking the Octocat logo at the top-left of the screen will take you to your dashboard page.
You're now ready to use GitHub.
//////////////////////////
画面左上にある Octocat のロゴをクリックすると、ダッシュボードのページが開きます。
これで、GitHub を使う準備が整いました。

//////////////////////////
==== SSH Access
//////////////////////////
==== SSH でのアクセス

(((SSH keys, with GitHub)))
//////////////////////////
As of right now, you're fully able to connect with Git repositories using the `https://` protocol, authenticating with the username and password you just set up.
However, to simply clone public projects, you don't even need to sign up - the account we just created comes into play when we fork projects and push to our forks a bit later.
//////////////////////////
この時点ですでに、`https://` プロトコルを使った Git リポジトリへの接続ができるようになっています。
接続する際には、先ほど指定したユーザー名とパスワードを利用します。
しかし、単に公開プロジェクトをクローンするだけなら、そもそもアカウントを取得する必要すらありません。
取得したアカウントが役立つのは、プロジェクトをフォークして、そのフォークにプッシュするときです。

//////////////////////////
If you'd like to use SSH remotes, you'll need to configure a public key.
(If you don't already have one, see <<_generate_ssh_key>>.)
Open up your account settings using the link at the top-right of the window:
//////////////////////////
SSH を使って接続したい場合は、公開鍵の設定が必要です
(公開鍵をまだ持っていない場合は、 <<_generate_ssh_key>> を参照ください)。
画面右上のリンクから、アカウント設定のページを開きましょう。

//////////////////////////
.The ``Account settings'' link.
image::images/account-settings.png[The ``Account settings'' link.]
//////////////////////////
.``Account settings'' のリンク
image::images/account-settings.png[``Account settings'' のリンク]

//////////////////////////
Then select the ``SSH keys'' section along the left-hand side.
//////////////////////////
そして、左側にある ``SSH keys'' を選択します。

//////////////////////////
.The ``SSH keys'' link.
image::images/ssh-keys.png[The ``SSH keys'' link.]
//////////////////////////
.``SSH keys'' のリンク
image::images/ssh-keys.png[``SSH keys'' のリンク]

//////////////////////////
From there, click the "`Add an SSH key`" button, give your key a name, paste the contents of your `~/.ssh/id_rsa.pub` (or whatever you named it) public-key file into the text area, and click ``Add key''.
//////////////////////////
ここで "`Add an SSH key`" ボタンをクリックし、鍵の名前を入力し、自分の公開鍵ファイル (`~/.ssh/id_rsa.pub` あるいは、自分で設定したその他の名前)
の内容をテキストエリアに貼り付けて、 ``Add key'' をクリックします。

[NOTE]
//////////////////////////
====
Be sure to name your SSH key something you can remember. You can name each of your keys (e.g. "My Laptop" or "Work Account") so that if you need to revoke a key later, you can easily tell which one you're looking for.
====
//////////////////////////
====
鍵の名前は、自分で覚えやすいものにしておきましょう。鍵ごとに「ラップトップ」「仕事用」などの名前をつけておけば、
後で鍵を破棄することになったときに、どれを破棄すればいいのかがわかりやすくなります。
====

[[_personal_avatar]]
//////////////////////////
==== Your Avatar
//////////////////////////
==== アバター

//////////////////////////
Next, if you wish, you can replace the avatar that is generated for you with an image of your choosing. First go to the ``Profile'' tab (above the SSH Keys tab) and click ``Upload new picture''.
//////////////////////////
自分のアカウント用のアバターとして、好きな画像を指定することもできます。
まずは、SSH key タブの上にある ``Profile'' タブを開き、``Upload new picture'' をクリックしましょう。

//////////////////////////
.The ``Profile'' link.
image::images/your-profile.png[The ``Profile'' link.]
//////////////////////////
.``Profile'' のリンク
image::images/your-profile.png[``Profile'' のリンク]

//////////////////////////
We'll chose a copy of the Git logo that is on our hard drive and then we get a chance to crop it.
//////////////////////////
ハードディスク上にある Git のロゴを選ぶと、必要な部分だけを切り抜けるようになります。

//////////////////////////
.Crop your avatar
image::images/avatar-crop.png[Crop your uploaded avatar.]
//////////////////////////
.アバターの切り抜き
image::images/avatar-crop.png[アップロードしたアバターを切り抜く]

//////////////////////////
Now anywhere you interact on the site, people will see your avatar next to your username.
//////////////////////////
これで、GitHub 上で何かのアクションを起こしたときに、あなたのユーザー名の隣にその画像が表示されるようになりました。

//////////////////////////
If you happen to have uploaded an avatar to the popular Gravatar service (often used for Wordpress accounts), that avatar will be used by default and you don't need to do this step.
//////////////////////////
もしすでに Gravatar にアバターを登録している場合
(Wordpress のアカウントを持っている人の多くが、Gravatar を使っています)
は、デフォルトでそのアバターが使われるので、何もする必要がありません。

//////////////////////////
==== Your Email Addresses
//////////////////////////
==== メールアドレス

//////////////////////////
The way that GitHub maps your Git commits to your user is by email address. If you use multiple email addresses in your commits and you want GitHub to link them up properly, you need to add all the email addresses you have used to the Emails section of the admin section.
//////////////////////////
GitHub が Git のコミットとユーザーを紐付けるときに使うのが、メールアドレスです。
複数のメールアドレスを使い分けてコミットしているときに、それをあなたのアカウントに適切にリンクさせるためには、
すべてのメールアドレスを管理画面の Emails セクションで登録する必要があります。

[[_add_email_addresses]]
//////////////////////////
.Add email addresses
image::images/email-settings.png[Add all your email addresses.]
//////////////////////////
.メールアドレスの追加
image::images/email-settings.png[メールアドレスの追加]

//////////////////////////
In <<_add_email_addresses>> we can see some of the different states that are possible. The top address is verified and set as the primary address, meaning that is where you'll get any notifications and receipts. The second address is verified and so can be set as the primary if you wish to switch them. The final address is unverified, meaning that you can't make it your primary address. If GitHub sees any of these in commit messages in any repository on the site, it will be linked to your user now.

//////////////////////////
<<_add_email_addresses>> を見ると、メールアドレスにはさまざまな状態があることがわかります。
最初のアドレスは検証済みで、プライマリアドレスとして設定されています。つまり、各種の通知や有償プランの領収書などが、このアドレスに届くということです。
二番目のアドレスも検証済みです。もしプライマリアドレスをこちらに変更したい場合は、切り替えることができます。
最後のアドレスは未検証です。検証済みになるまでは、これをプライマリアドレスにすることはできません。
GitHub のサイト上にこれらのメールアドレスを含むコミットがあった場合、それがあなたのアカウントと関連づけられます。

//////////////////////////
==== Two Factor Authentication
//////////////////////////
==== 二要素認証

//////////////////////////
Finally, for extra security, you should definitely set up Two-factor Authentication or ``2FA''. Two-factor Authentication is an authentication mechanism that is becoming more and more popular recently to mitigate the risk of your account being compromised if your password is stolen somehow. Turning it on will make GitHub ask you for two different methods of authentication, so that if one of them is compromised, an attacker will not be able to access your account.

//////////////////////////
最後に、セキュリティ高めるために、二要素認証(``2FA'')の設定をしておきましょう。
二要素認証とは、認証方式のひとつで、最近よく使われるようになりつつあります。
この方式を使うと、仮に何らかの方法でパスワードが盗まれてしまった場合でも、アカウントを乗っ取られるリスクを減らせます。
二要素認証を有効にすると、GitHub は複数の方法による認証を行うようになります。
仮にその一方の情報が盗まれたとしても、それだけでは、攻撃者があなたのアカウントにアクセスすることはできないのです。

//////////////////////////
You can find the Two-factor Authentication setup under the Security tab of your Account settings.
//////////////////////////
二要素認証の設定は、アカウント設定画面の「Security」タブの中にあります。

//////////////////////////
.2FA in the Security Tab
image::images/2fa-1.png[2FA in the Security Tab]
//////////////////////////
.Security タブの二要素認証
image::images/2fa-1.png[Security タブでの二要素認証]

//////////////////////////
If you click on the ``Set up two-factor authentication'' button, it will take you to a configuration page where you can choose to use a phone app to generate your secondary code (a ``time based one-time password''), or you can have GitHub send you a code via SMS each time you need to log in.
//////////////////////////
``Set up two-factor authentication'' ボタンをクリックすると、設定ページに移動します。
ここでは、スマホアプリを使ってセキュリティコード(``時刻ベースのワンタイムパスワード'')を設定するか、
ログインのたびに GitHub からの SMS でコードを受け取るようにするのかを選べます。

//////////////////////////
After you choose which method you prefer and follow the instructions for setting up 2FA, your account will then be a little more secure and you will have to provide a code in addition to your password whenever you log into GitHub.
//////////////////////////
いずれかのお好みの方法を選び、指示に従って二要素認証を設定し終えたら、
あなたのアカウントは今までよりも少しだけ安全になります。
ただし、GitHub にログインするときには、パスワードだけでなくセキュリティコードも必要になります。