我正尝试使用CLI来更新bot设置,以便在设置它在Docker容器中运行之前,我可以使用配置文件。
我在GitHub中创建了一个私有测试仓库,其中包含一个简单的“hello world”项目,该项目有一些过时的依赖项。当我运行npx renovate
时,我得到错误“Repository is not found”。下面给出了详细的错误日志。
我的config.js
文件如下所示
const dotenv = require('dotenv').config()
module.exports = {
token: process.env.GITHUB_ACCESS_TOKEN,
hostRules: [{'domainName': 'github.com', 'token': process.env.GITHUB_ACCESS_TOKEN}],
endpoint: 'https://api.github.com',
gitAuthor: 'jacob-jameson <jameson.signup@gmail.com>',
platform: 'github',
autodiscover: 'false',
repositories: ['jacob-jameson/Renovate_SelfHosted']
};
我的package.json
如下所示
{
"name": "renovate_selfhosted",
"version": "1.0.0",
"description": "Simple Node.js project to test self-hosted Renovate dependency bot",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Jacob Jameson",
"license": "ISC",
"dependencies": {
"dotenv": "^16.0.0",
"express": "^4.0.0",
"renovate": "^34.154.6"
}
}
给出的调试级控制台日志为:
DEBUG: Using RE2 as regex engine
DEBUG: Parsing configs
DEBUG: Checking for config file in C:\Dev\Renovate_SelfHosted/config.js
WARN: Config needs migrating
"originalConfig": {
"token": "***********",
"hostRules": [{"domainName": "github.com", "token": "***********"}],
"endpoint": "https://api.github.com",
"gitAuthor": "Jacob Jameson <jameson.signup@gmail.com>",
"platform": "github",
"autodiscover": "false",
"repositories": ["jacob-jameson/Renovate_SelfHosted"]
},
"migratedConfig": {
"token": "***********",
"hostRules": [{"matchHost": "github.com", "token": "***********"}],
"endpoint": "https://api.github.com",
"gitAuthor": "Jacob Jameson <jameson.signup@gmail.com>",
"platform": "github",
"autodiscover": false,
"repositories": ["jacob-jameson/Renovate_SelfHosted"]
}
DEBUG: File config
"config": {
"token": "***********",
"hostRules": [{"matchHost": "github.com", "token": "***********"}],
"endpoint": "https://api.github.com",
"gitAuthor": "Jacob Jameson <jameson.signup@gmail.com>",
"platform": "github",
"autodiscover": false,
"repositories": ["jacob-jameson/Renovate_SelfHosted"]
}
DEBUG: CLI config
"config": {}
DEBUG: Env config
"config": {"hostRules": []}
DEBUG: Combined config
"config": {
"token": "***********",
"hostRules": [{"matchHost": "github.com", "token": "***********"}],
"endpoint": "https://api.github.com",
"gitAuthor": "Jacob Jameson <jameson.signup@gmail.com>",
"platform": "github",
"autodiscover": false,
"repositories": ["jacob-jameson/Renovate_SelfHosted"]
}
DEBUG: Adding trailing slash to endpoint
DEBUG: Found valid git version: 2.37.1
DEBUG: Platform config
"platformConfig": {
"hostType": "github",
"endpoint": "https://api.github.com/",
"isGHApp": false,
"isGhe": false,
"userDetails": {"username": "jacob-jameson", "name": null}
},
"renovateUsername": "jacob-jameson"
DEBUG: Using configured gitAuthor (Jacob Jameson <jameson.signup@gmail.com>)
DEBUG: Adding token authentication for api.github.com to hostRules
DEBUG: Using baseDir: C:/Users/JACOBJ~1/AppData/Local/Temp/renovate
DEBUG: Using cacheDir: C:/Users/JACOBJ~1/AppData/Local/Temp/renovate/cache
DEBUG: Using containerbaseDir: C:/Users/JACOBJ~1/AppData/Local/Temp/renovate/cache/containerbase
DEBUG: Initializing Renovate internal cache into C:/Users/JACOBJ~1/AppData/Local/Temp/renovate/cache/renovate/renovate-cache-v1
DEBUG: Commits limit = null
DEBUG: Setting global hostRules
DEBUG: Adding token authentication for github.com to hostRules
DEBUG: Adding token authentication for api.github.com to hostRules
DEBUG: validatePresets()
DEBUG: Reinitializing hostRules for repo
DEBUG: Clearing hostRules
DEBUG: Adding token authentication for github.com to hostRules
DEBUG: Adding token authentication for api.github.com to hostRules
INFO: Repository started (repository=jacob-jameson/Renovate_SelfHosted)
"renovateVersion": "34.154.6"
DEBUG: Using localDir: C:/Users/JACOBJ~1/AppData/Local/Temp/renovate/repos/github/jacob-jameson/Renovate_SelfHosted (repository=jacob-jameson/Renovate_SelfHosted)
DEBUG: PackageFiles.clear() - Package files deleted (repository=jacob-jameson/Renovate_SelfHosted)
DEBUG: initRepo("jacob-jameson/Renovate_SelfHosted") (repository=jacob-jameson/Renovate_SelfHosted)
DEBUG: Caught initRepo error (repository=jacob-jameson/Renovate_SelfHosted)
"err": {
"message": "not-found",
"stack": "Error: not-found\n at Proxy.initRepo (C:\\Dev\\Renovate_SelfHosted\\node_modules\\renovate\\lib\\modules\\platform\\github\\index.ts:392:13)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at getPlatformConfig (C:\\Dev\\Renovate_SelfHosted\\node_modules\\renovate\\lib\\workers\\repository\\init\\apis.ts:52:26)\n at initApis (C:\\Dev\\Renovate_SelfHosted\\node_modules\\renovate\\lib\\workers\\repository\\init\\apis.ts:64:12)\n at initRepo (C:\\Dev\\Renovate_SelfHosted\\node_modules\\renovate\\lib\\workers\\repository\\init\\index.ts:37:12)\n at Object.renovateRepository (C:\\Dev\\Renovate_SelfHosted\\node_modules\\renovate\\lib\\workers\\repository\\index.ts:49:14)\n at attributes.repository (C:\\Dev\\Renovate_SelfHosted\\node_modules\\renovate\\lib\\workers\\global\\index.ts:181:11)\n at start (C:\\Dev\\Renovate_SelfHosted\\node_modules\\renovate\\lib\\workers\\global\\index.ts:166:7)\n at C:\\Dev\\Renovate_SelfHosted\\node_modules\\renovate\\lib\\renovate.ts:18:22"
}
ERROR: Repository is not found (repository=jacob-jameson/Renovate_SelfHosted)
DEBUG: Repository result: not-found, status: disabled, enabled: false, onboarded: undefined (repository=jacob-jameson/Renovate_SelfHosted)
DEBUG: Repository timing splits (milliseconds) (repository=jacob-jameson/Renovate_SelfHosted)
"splits": {},
"total": 530
DEBUG: Package cache statistics (repository=jacob-jameson/Renovate_SelfHosted)
"get": {"count": 0},
"set": {"count": 0}
DEBUG: dns cache (repository=jacob-jameson/Renovate_SelfHosted)
"hosts": []
INFO: Repository finished (repository=jacob-jameson/Renovate_SelfHosted)
"cloned": undefined,
"durationMs": 530
DEBUG: Renovate exiting
INFO: Renovate is exiting with a non-zero code due to the following logged errors
"loggerErrors": [
{
"name": "renovate",
"level": 50,
"logContext": "zM13viiLgx6NWxBuYFC1r",
"repository": "jacob-jameson/Renovate_SelfHosted",
"msg": "Repository is not found"
}
]
我试着修改、删除repo并重写代码,我想我可能修改了repo中的设置,或者可能有一个看不见的错字,但是repo仍然找不到。
我尝试将autoDiscover
更改为true
,但这也不起作用。
我确保我的本地git user.name
和user.email
与我的GitHub详细信息匹配,但仍然不起作用。
我尝试生成一个新的访问令牌,仍然不起作用。
提前感谢您的帮助!
1条答案
按热度按时间qojgxg4l1#
如果找不到repo,则令牌存在问题-请确保它具有完全的“repo”访问权限。