使用带有客户端Javascript和OAuth.io的GitHub API派生repo
我正在尝试编写客户端Javascript,它将派生一个给定的GitHub repo。我使用OAuth.io服务获取一个OAuth令牌,API作用域设置为“public_repo”和“repo” 我正在使用使用带有客户端Javascript和OAuth.io的GitHub API派生repo,javascript,github,oauth,github-api,Javascript,Github,Oauth,Github Api,我正在尝试编写客户端Javascript,它将派生一个给定的GitHub repo。我使用OAuth.io服务获取一个OAuth令牌,API作用域设置为“public_repo”和“repo” 我正在使用fork方法(在makeWebsite函数中)访问GitHub API: 当我运行此代码并完成OAuth舞蹈时,出现以下错误: var makeWebsite = function(ghClient) { ghClient.post("/repos/MyInternetWebsite/tem
fork
方法(在makeWebsite
函数中)访问GitHub API:
当我运行此代码并完成OAuth舞蹈时,出现以下错误:
var makeWebsite = function(ghClient) {
ghClient.post("/repos/MyInternetWebsite/template/forks").done(cb);
};
看起来问题出在github.js上。事实证明,OAuth.io本身提供了处理身份验证的简单http访问。值得一提的是,fork所需要的只是public\u repo
范围。任何GitHub API调用都适合您吗?有破坏性的API调用吗?有<代码>repo.show(函数(err,myRepo){console.log(myRepo);})代码>让我知道所有的。这让我觉得有一个范围问题。
var makeWebsite = function(ghClient) {
ghClient.post("/repos/MyInternetWebsite/template/forks").done(cb);
};