VSCODE设置JSON模式引用对私人GitHub存储库

发布于 2025-01-26 17:21:40 字数 756 浏览 5 评论 0原文

我目前正在使用Visual Studio代码1.66.2,其中包括GitHub存储库和GitHub拉的请求和已安装的问题。我可以从vscode访问和从我的私人存储库中拉,推动等等,而没有问题。

但是,在编写涉及架构导入的JSON文档时,例如:

{
    "$schema": "https://github.com/[company]/[thing]/blob/master/validation/jsonSchema/eor/1-0-0.json",
}

VSCODE声明:

无法从中加载模式 'https://github.com/ [company ]/ [thits/blob/master/validation/jsonschema/eor/1-0-0-0.json': 未找到。找不到所请求的位置。

我认为这是由于存储库是私有的,而Vscode无法访问它,但是鉴于我已授权它用于github访问,我无法弄清楚如何让它看到并引用JSON Schema文件。

我尝试将以下内容添加到VSCODE的设置中

"http.proxy": "http://[username]:[personal access token]@github.com/[company]/[thing].git",
"http.proxyAuthorization": null,
"http.proxyStrictSSL": true

任何建议将不胜感激。

I'm currently using Visual Studio Code 1.66.2, with Github Repositories and GitHub Pull Requests and Issues extensions installed. I can pull, push, and so forth to and from my private repository from VSCode without a problem.

However, when writing a JSON document involving a schema import, for example:

{
    "$schema": "https://github.com/[company]/[thing]/blob/master/validation/jsonSchema/eor/1-0-0.json",
}

VSCode claims:

Unable to load schema from
'https://github.com/[company]/[thing]/blob/master/validation/jsonSchema/eor/1-0-0.json':
Not Found. The requested location could not be found.

I assume this is due to the repository being private and VSCode not being able to access it, but given that I've authorized it for GitHub access, I haven't been able to figure out how to let it see and reference the JSON schema file.

I've tried adding the following to VSCode's settings.json:

"http.proxy": "http://[username]:[personal access token]@github.com/[company]/[thing].git",
"http.proxyAuthorization": null,
"http.proxyStrictSSL": true

But that just results in endless "Loading..." for the json file in question.

Any suggestions would be greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文