Repository: incubator-mynewt-site Updated Branches: refs/heads/develop 307f05af9 -> 4981e8644
doc about accessing a private repo Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/4981e864 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/4981e864 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/4981e864 Branch: refs/heads/develop Commit: 4981e8644db887f91977d598bfefd1c686de9576 Parents: 307f05a Author: aditihilbert <[email protected]> Authored: Mon Feb 13 16:53:06 2017 -0800 Committer: aditihilbert <[email protected]> Committed: Mon Feb 13 16:53:06 2017 -0800 ---------------------------------------------------------------------- docs/os/tutorials/repo/private_repo.md | 47 +++++++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 48 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/4981e864/docs/os/tutorials/repo/private_repo.md ---------------------------------------------------------------------- diff --git a/docs/os/tutorials/repo/private_repo.md b/docs/os/tutorials/repo/private_repo.md new file mode 100644 index 0000000..0e64b3b --- /dev/null +++ b/docs/os/tutorials/repo/private_repo.md @@ -0,0 +1,47 @@ +## Accessing a private repository + +To access a private repository, newt needs to be configured with one of the following: + +* Access token for the repository +* Basic auth login and password for the user + + +**NOTE:** To create a github access token, see [ +https://help.github.com/articles/creating-an-access-token-for-command-line-use/](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) + +There are two ways to specify this information, as shown below. In +these examples, both a token and a login/password are specified, but you +only need to specify one of these. + +1\. project.yml (probably world-readable and therefore not secure): + +```hl_lines="6 7 8" + repository.my-private-repo: + type: github + vers: 0-dev + user: owner-of-repo + repo: repo-name + token: '8ab6433f8971b05c2a9c3341533e8ddb754e404e' + login: githublogin + password: githubpassword +``` + +2\. $HOME/.newt/repos.yml + +```hl_lines="2 3 4" + repository.my-private-repo: + token: '8ab6433f8971b05c2a9c3341533e8ddb754e404e' + login: githublogin + password: githubpassword +``` + +If both a token and a login+password are specified, newt uses the token. +If both the project.yml file and the private repos.yml file specify +security credentials, newt uses the project.yml settings. + +**NOTE:** When newt downloads the actual repo content, as +opposed to just the repository.yml file, it does not use the same +mechanism. Instead, it invokes the git command line tool. This is an +annoyance because the user cannot use the same access token for all git +operations. This is something that will be fixed in the future. + http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/4981e864/mkdocs.yml ---------------------------------------------------------------------- diff --git a/mkdocs.yml b/mkdocs.yml index fc43b49..eb13a8a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -42,6 +42,7 @@ pages: - toc: 'os/tutorials/repo/add_repos.md' - 'Upgrade a Repo': 'os/tutorials/repo/upgrade_repo.md' - 'Turn project into a Repo': 'os/tutorials/repo/create_repo.md' + - 'Access a private Repo': 'os/tutorials/repo/private_repo.md' - 'Tasks and Priority Management': 'os/tutorials/tasks_lesson.md' - 'Enable Wi-Fi on Arduino Zero': 'os/tutorials/wi-fi_on_arduino.md' - 'Write a Test Suite for a Package': 'os/tutorials/unit_test.md'
