Skip to content

Commit

Permalink
Merge pull request #592 from datalad-handbook/gh-auth
Browse files Browse the repository at this point in the history
GH-auth: more explanation on how to get a GitHub token
  • Loading branch information
adswa committed Oct 21, 2020
2 parents 269ec24 + 14be8dd commit 30f9243
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/basics/101-130-yodaproject.rst
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ Publishing the dataset to GitHub
if you want to.
- Or exchange the command ``create-sibling-github`` with
``create-sibling-gitlab`` if you have a GitLab account instead of a GitHub
account.
account (checkout `the documentation <http://docs.datalad.org/en/stable/generated/man/datalad-create-sibling-gitlab.html>`_ for differences in invocation beforehand, though).
- Decide to not follow along.

For this, you need to
Expand All @@ -630,9 +630,11 @@ command (or, for `GitLab <https://about.gitlab.com/>`_, :command:`datalad create

.. index:: ! datalad command; create-sibling-github, ! datalad command; create-sibling-gitlab

The two commands have different arguments and options.
Here, we look at :command:`datalad create-sibling-github`.
The command takes a repository name and GitHub authentication credentials
(either in the command line call with options ``github-login <NAME>`` and
``github-passwd <PASSWORD>``, with an *oauth* token stored in the Git
``github-passwd <PASSWORD>``, with an *oauth* `token <https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token>`_ stored in the Git
configuration [#f5]_, or interactively). Based on the credentials and the
repository name, it will create a new, empty repository on GitHub, and
configure this repository as a sibling of the dataset:
Expand Down Expand Up @@ -863,6 +865,9 @@ reproduce your data science project easily from scratch!
.. [#f5] Such a token can be obtained, for example, using the command line
GitHub interface (https://github.com/sociomantic/git-hub) by running:
``git hub setup`` (if no 2FA is used).
It is useful to do this, so here's help: Clone the `GitHub repository <https://github.com/sociomantic/git-hub>`_ to your local computer.
Decide whether you want to build a Debian package to install, or install the single-file Python script distributed in the repository.
Make sure that all `requirements <https://github.com/sociomantic-tsunami/git-hub#dependencies>`_ for your preferred version are installed , and run either ``make deb`` followed by ``sudo dpkg -i deb/git-hub*all.deb`` or ``make install``.
.. [#f6] Note that this is a :command:`git push`, not :command:`datalad push`.
Tags could be pushed upon a :command:`datalad push`, though, if one
Expand Down

0 comments on commit 30f9243

Please sign in to comment.