美文网首页
在Gitlens中添加Gitee配置 解决no auto-det

在Gitlens中添加Gitee配置 解决no auto-det

作者: 飞跑的蛤蟆 | 来源:发表于2023-06-12 18:01 被阅读0次

Gitlens是vscode中的一个插件,它提供了很多有用的功能,例如copy remote file url

图片.png

之前一直用的好好的,复制出来的链接也能用(之前用的是Github),可是今天在用这个功能的时候开始“报错”:no auto-detected or configured remote providers found

图片.png

去人家的官网看了看,人家是这么说的:

GitLens provides rich integrations with many remote providers, including GitHub, GitHub Enterprise, GitLab, Bitbucket, Bitbucket Server, Azure DevOps. You can also define custom remote providers or remote providers with custom domains as well.

大概就是,人家内部支持了这些git仓库,但是别的仓库你也可以自己配置。

下面的就是我配置的gitee

    "gitlens.remotes": [{
        "domain": "gitee.com",
        "type": "Custom",
        "name": "My Company",
        "protocol": "https",
        "urls": {
            "repository": "https://gitee.com/${repo}",
            "branches": "https://gitee.com/${repo}/branches",
            "branch": "https://gitee.com/${repo}/commits/${branch}",
            "commit": "https://gitee.com/${repo}/commit/${id}",
            "file": "https://gitee.com/${repo}?path=${file}${line}",
            "fileInBranch": "https://gitee.com/${repo}/blob/${branch}/${file}${line}",
            "fileInCommit": "https://gitee.com/${repo}/blob/${id}/${file}${line}",
            "fileLine": "#L${line}",
            "fileRange": "#L${start}-L${end}"
            }
        }]

相关文章

网友评论

      本文标题:在Gitlens中添加Gitee配置 解决no auto-det

      本文链接:https://www.haomeiwen.com/subject/xfsszktx.html