Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Github Heroku应用程序设置api不适用于私有git存储库_Github_Heroku_Heroku Api - Fatal编程技术网

Github Heroku应用程序设置api不适用于私有git存储库

Github Heroku应用程序设置api不适用于私有git存储库,github,heroku,heroku-api,Github,Heroku,Heroku Api,我正在创建一个仪表板来管理我的heroku应用程序,尤其是在heroku上部署新应用程序 我正在使用heroku API进行应用程序设置()和节点heroku客户端() 我在尝试使用私有git存储库创建新应用程序时遇到了一个问题 heroku.post('/app-setups', {body: source_blob: { url: 'https://github.com/my_account/my_private_repos/tarball/master/' } }) 当

我正在创建一个仪表板来管理我的heroku应用程序,尤其是在heroku上部署新应用程序

我正在使用heroku API进行应用程序设置()和节点heroku客户端()

我在尝试使用私有git存储库创建新应用程序时遇到了一个问题

heroku.post('/app-setups', {body: 
  source_blob: {
    url: 'https://github.com/my_account/my_private_repos/tarball/master/'
  }
})
当url是公共git repos时,这可以正常工作,但当它是私有git repos时,我从heroku得到以下错误:

failure_message: "could not find the source blob"
你知道我如何将他们的API用于私有git repos URL吗

编辑:我找到了解决方案

要使用git private repos,url应如下所示:

{
  url: "https://api.github.com/repos/<username>/<repo>/tarball/<branch>?access_token=<github-token>"
}
{
  url: "https://api.github.com/repos/<username>/<repo>/tarball/<branch>?access_token=<github-token>"
}
{
url:“https://api.github.com/repos///tarball/?access_token="
}

我在这里发布解决方案

要使用git private repos,url应如下所示:

{
  url: "https://api.github.com/repos/<username>/<repo>/tarball/<branch>?access_token=<github-token>"
}
{
  url: "https://api.github.com/repos/<username>/<repo>/tarball/<branch>?access_token=<github-token>"
}
{
url:“https://api.github.com/repos///tarball/?access_token="
}

感谢您用您的解决方案更新您的问题@Alexis将您的编辑添加为答案。谢谢您的提问,我刚刚完成了。希望它对您有所帮助:)此方法已不推荐为此而进行的任何其他工作?非常感谢,这很好。