使用nodegit访问私有仓库

问题描述

我正在构建github应用,并尝试使用nodegit访问和克隆私有存储库,

我收到404错误

在这里调用克隆函数

Git.Clone("https://x-access-token:"+installation_token+"@github.com/"+full_repo_name+".git",repository,cloneOptions).then(function(repo) {
  console.log('Repo clone done!') 
})

然后我从webhook上下文中获取了令牌+ full_repo_name:

const { token } = await context.github.auth({ type: "installation" })
const full_repo_name = context.payload.repository.full_name

将回购设置为公开后,一切都会按预期进行。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)