github의 R 소스를 설치할 때, 다음과 같이 devtools 패키지를 설치하고, devtools::install_github를 사용한다.


install.packages("devtools")

require(devtools)

devtools::install_github('prestodb/RPresto') 
require(RPresto)



install github할 때 403 에러가 발생할 수 있다. 

> devtools::install_github('prestodb/RPresto')

Downloading GitHub repo prestodb/RPresto@master

Error in download(dest, src, auth) : client error: (403) Forbidden




403 Forbidden 에러가 발생하면,  터미널에서 테스트해서 왜 에러가 나는지 확인한다. rate limiting에 의해 403 에러가 발생하면 좀 기다리면 풀린다. 


$ curl -i https://api.github.com/repos/prestodb/RPresto

403 Forbidden

...

X-Content-Type-Options: nosniff


{

  "message": "API rate limit exceeded for 1.1.1.1. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)",

  "documentation_url": "https://developer.github.com/v3/#rate-limiting"

}





정상적일 때는 200 ok이지만, 403일 때는 body에 내용이 남겨진다.


(http://api.github.com/repos/[username]/[reponame] 포맷으로 테스트 가능)

$ curl -i https://api.github.com/repos/prestodb/RPresto

HTTP/1.1 200 OK

Server: GitHub.com

Date: Tue, 06 Oct 2015 08:23:33 GMT

Content-Type: application/json; charset=utf-8

Content-Length: 5938

Status: 200 OK

X-RateLimit-Limit: 60

X-RateLimit-Remaining: 18

X-RateLimit-Reset: 1444121790

Cache-Control: public, max-age=60, s-maxage=60

Last-Modified: Fri, 11 Sep 2015 04:44:50 GMT

ETag: "1dfc5985c248ad055c8a6ba89f0f5cf9"

Vary: Accept

X-GitHub-Media-Type: github.v3

X-XSS-Protection: 1; mode=block

X-Frame-Options: deny

Content-Security-Policy: default-src 'none'

Access-Control-Allow-Credentials: true

Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval

Access-Control-Allow-Origin: *

X-GitHub-Request-Id: D3386033:1768B:34FB0FA:56138504

Strict-Transport-Security: max-age=31536000; includeSubdomains; preload

X-Content-Type-Options: nosniff

Vary: Accept-Encoding

X-Served-By: cee4c0729c8e9147e7abcb45b9d69689


{

  "id": 32487073,

  "name": "RPresto",

  "full_name": "prestodb/RPresto",

  "owner": {

    "login": "prestodb",

    "id": 6882181,

    "avatar_url": "https://avatars.githubusercontent.com/u/6882181?v=3",

    "gravatar_id": "",

    "url": "https://api.github.com/users/prestodb",

    "html_url": "https://github.com/prestodb",

    "followers_url": "https://api.github.com/users/prestodb/followers",

    "following_url": "https://api.github.com/users/prestodb/following{/other_user}",

    "gists_url": "https://api.github.com/users/prestodb/gists{/gist_id}",

    "starred_url": "https://api.github.com/users/prestodb/starred{/owner}{/repo}",

    "subscriptions_url": "https://api.github.com/users/prestodb/subscriptions",

    "organizations_url": "https://api.github.com/users/prestodb/orgs",

    "repos_url": "https://api.github.com/users/prestodb/repos",

    "events_url": "https://api.github.com/users/prestodb/events{/privacy}",

    "received_events_url": "https://api.github.com/users/prestodb/received_events",

    "type": "Organization",

    "site_admin": false

  },

  "private": false,

  "html_url": "https://github.com/prestodb/RPresto",

  "description": "DBI-based adapter for Presto for the statistical programming language R.",

  "fork": false,

  "url": "https://api.github.com/repos/prestodb/RPresto",

  "forks_url": "https://api.github.com/repos/prestodb/RPresto/forks",

  "keys_url": "https://api.github.com/repos/prestodb/RPresto/keys{/key_id}",

  "collaborators_url": "https://api.github.com/repos/prestodb/RPresto/collaborators{/collaborator}",

  "teams_url": "https://api.github.com/repos/prestodb/RPresto/teams",

  "hooks_url": "https://api.github.com/repos/prestodb/RPresto/hooks",

  "issue_events_url": "https://api.github.com/repos/prestodb/RPresto/issues/events{/number}",

  "events_url": "https://api.github.com/repos/prestodb/RPresto/events",

  "assignees_url": "https://api.github.com/repos/prestodb/RPresto/assignees{/user}",

  "branches_url": "https://api.github.com/repos/prestodb/RPresto/branches{/branch}",

  "tags_url": "https://api.github.com/repos/prestodb/RPresto/tags",

  "blobs_url": "https://api.github.com/repos/prestodb/RPresto/git/blobs{/sha}",

  "git_tags_url": "https://api.github.com/repos/prestodb/RPresto/git/tags{/sha}",

  "git_refs_url": "https://api.github.com/repos/prestodb/RPresto/git/refs{/sha}",

  "trees_url": "https://api.github.com/repos/prestodb/RPresto/git/trees{/sha}",

  "statuses_url": "https://api.github.com/repos/prestodb/RPresto/statuses/{sha}",

  "languages_url": "https://api.github.com/repos/prestodb/RPresto/languages",

  "stargazers_url": "https://api.github.com/repos/prestodb/RPresto/stargazers",

  "contributors_url": "https://api.github.com/repos/prestodb/RPresto/contributors",

  "subscribers_url": "https://api.github.com/repos/prestodb/RPresto/subscribers",

  "subscription_url": "https://api.github.com/repos/prestodb/RPresto/subscription",

  "commits_url": "https://api.github.com/repos/prestodb/RPresto/commits{/sha}",

  "git_commits_url": "https://api.github.com/repos/prestodb/RPresto/git/commits{/sha}",

  "comments_url": "https://api.github.com/repos/prestodb/RPresto/comments{/number}",

  "issue_comment_url": "https://api.github.com/repos/prestodb/RPresto/issues/comments{/number}",

  "contents_url": "https://api.github.com/repos/prestodb/RPresto/contents/{+path}",

  "compare_url": "https://api.github.com/repos/prestodb/RPresto/compare/{base}...{head}",

  "merges_url": "https://api.github.com/repos/prestodb/RPresto/merges",

  "archive_url": "https://api.github.com/repos/prestodb/RPresto/{archive_format}{/ref}",

  "downloads_url": "https://api.github.com/repos/prestodb/RPresto/downloads",

  "issues_url": "https://api.github.com/repos/prestodb/RPresto/issues{/number}",

  "pulls_url": "https://api.github.com/repos/prestodb/RPresto/pulls{/number}",

  "milestones_url": "https://api.github.com/repos/prestodb/RPresto/milestones{/number}",

  "notifications_url": "https://api.github.com/repos/prestodb/RPresto/notifications{?since,all,participating}",

  "labels_url": "https://api.github.com/repos/prestodb/RPresto/labels{/name}",

  "releases_url": "https://api.github.com/repos/prestodb/RPresto/releases{/id}",

  "created_at": "2015-03-18T22:11:28Z",

  "updated_at": "2015-09-11T04:44:50Z",

  "pushed_at": "2015-10-02T17:48:23Z",

  "git_url": "git://github.com/prestodb/RPresto.git",

  "ssh_url": "git@github.com:prestodb/RPresto.git",

  "clone_url": "https://github.com/prestodb/RPresto.git",

  "svn_url": "https://github.com/prestodb/RPresto",

  "homepage": null,

  "size": 308,

  "stargazers_count": 26,

  "watchers_count": 26,

  "language": "R",

  "has_issues": true,

  "has_downloads": true,

  "has_wiki": true,

  "has_pages": false,

  "forks_count": 2,

  "mirror_url": null,

  "open_issues_count": 5,

  "forks": 2,

  "open_issues": 5,

  "watchers": 26,

  "default_branch": "master",

  "organization": {

    "login": "prestodb",

    "id": 6882181,

    "avatar_url": "https://avatars.githubusercontent.com/u/6882181?v=3",

    "gravatar_id": "",

    "url": "https://api.github.com/users/prestodb",

    "html_url": "https://github.com/prestodb",

    "followers_url": "https://api.github.com/users/prestodb/followers",

    "following_url": "https://api.github.com/users/prestodb/following{/other_user}",

    "gists_url": "https://api.github.com/users/prestodb/gists{/gist_id}",

    "starred_url": "https://api.github.com/users/prestodb/starred{/owner}{/repo}",

    "subscriptions_url": "https://api.github.com/users/prestodb/subscriptions",

    "organizations_url": "https://api.github.com/users/prestodb/orgs",

    "repos_url": "https://api.github.com/users/prestodb/repos",

    "events_url": "https://api.github.com/users/prestodb/events{/privacy}",

    "received_events_url": "https://api.github.com/users/prestodb/received_events",

    "type": "Organization",

    "site_admin": false

  },

  "network_count": 2,

  "subscribers_count": 20

}




Posted by '김용환'
,