debcheckout -a 码云 仓库 配置

xiao sheng wen(肖盛文) <[email protected]> Wed, 25 Oct 2023 10:14:41 +0800
Newsgroups gmane.linux.debian.user.chinese.gb
Organization https://www.atzlinux.com
Message-ID <[email protected]>
大家好!

     使用 debcheckout -a 可以直接设置好仓库提交权限的 URL。

man debcheckout 看到有个 DEBCHECKOUT_AUTH_URLS 变量可以增加自定义的 git 
仓库设置:

        DEBCHECKOUT_AUTH_URLS
            This variable should be a space separated list of Perl regular
            expressions and replacement texts, which must come in pairs: 
REGEXP
            TEXT REGEXP TEXT ... and so on. Each pair denotes a substitution
            which is applied to repository URLs if other built-in means of
            building URLs for authenticated mode (see -a) have failed.

            References to matching substrings in the replacement texts are
            allowed as usual in Perl by the means of $1, $2, ... and so on.

            This setting is used to configure the "authenticated mode" 
location
            for repositories. The Debian repositories on 
salsa.debian.org are
            implicitly defined, as is github.com.

            Here is a sample snippet suitable for the configuration files:

             DEBCHECKOUT_AUTH_URLS='
              ^\w+://(svn\.example\.com)/(.*) svn+ssh://$1/srv/svn/$2
              ^\w+://(git\.example\.com)/(.*) git+ssh://$1/home/git/$2
             '

想请教大家下, 该如何设置 码云 的这个正则表达式呢?

如:

debcheckout -a atzlinux-update-patch
can't use authenticated mode on repository 
'https://gitee.com/atzlinux/atzlinux-update-patch.git' since it is not a 
known repository (e.g. salsa.debian.org)

报错,希望能够设置为:

[email protected]:atzlinux/atzlinux-update-patch.git

谢谢!

-- 
肖盛文 xiao sheng wen
https://www.atzlinux.com 《铜豌豆 Linux》基于 Debian 的 Linux 中文 桌面 操作系统
Debian QA page: https://qa.debian.org/developer.php?login=atzlinux%40sina.com
Debian salsa: https://salsa.debian.org/atzlinux-guest
GnuPG Public Key: 0x00186602339240CB
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEvGv7H5NUQYeSuhtTJ2Egg8PSprAFAmU4ehEFAwAAAAAACgkQJ2Egg8PSprAA
mxAAmr4QOkS+xr0ITIdqrR3i81drGeDK/Szvzfy8+b96WNr6AkVrEzIUC3Qt+FURmxWcDMEM1mdW
vTROkMP82aN7yS/p0lhB0o7+AJ0GvKhhXTKJRp6pMU6cas6lH8CUz85eoU0r+YZADTH/KGM/p3VO
kzZZ56hark5BQjhFBG0VEhZDnQBkQGTZqriLkyLKo+ElcijQjYsVvGlGGifZ652astfUnek0ebPr
CZALVtC2C5hVkWSO45HPv0BYfxvswNVgEwYsBnVj5ArjoP+OcxWeA2bcRDXtaDoxhIOA4RyLFKWk
EkC4MRM20UA3R420+b0kvZY9XnkPwHq+UR3cu7zF1jENTNuMOiurXV83JFM0tn8J6p2Y584bngwk
xApyECVXQAFtmL0oHqiunNk7pDIE3qHhI62n6p1gF7r6ugSUQIdGODXJWwSrhnEN6Ko1AREreD0V
lql/XX732+OAPyienm0J4py+NXnNyppALeEUXBwqWwKzi1iSpVtxrNwRL4eRYpr9jrwteEmOlkFL
6CYI2Gl9H8owfd6/Rc+wbesN8CMArhOrNb63KsAQqU1gkBhkCkmrSJ2m21b+v+GlkGEdM0f7O5B5
fwCgB0IPobUip15wTZ3IdZv8cJv0lHxhg5/QP6Lyo8+xTOJNw1VOZzaLQW5D3rmKQjt59bjNrEVT
IUU=
=F1Rg
-----END PGP SIGNATURE-----