本地单用户存储库是否严格要求 svnserve ?

发布于 2024-08-25 16:42:11 字数 695 浏览 2 评论 0原文

我在阅读红豆书并注意到这一段:

不要被简单的想法所诱惑 让所有用户访问 直接通过 file:// URL 存储库。 即使存储库很容易 每个人都可以通过网络访问 分享,这是一个坏主意。它删除了 之间的任何保护层 用户和存储库:用户可以 无意中(或有意) 损坏存储库数据库,它 获取存储库变得困难 离线检查或升级,以及 它可能会导致文件混乱 权限问题(请参阅部分 称为“支持多个存储库 访问方法”)。请注意,这是 也是我们警告的原因之一 反对通过访问存储库 svn+ssh:// URL — 来自安全 的观点,实际上是相同的 作为本地用户通过 file:// 访问, 它可能意味着所有相同的 如果管理员不这样做就会出现问题 小心。

我意识到,由于我是唯一访问该存储库的人,所以这些警告似乎都不适用。我可以安全地关闭 svnserve 吗?只要有新版本发布,我就只需要担心升级我的 TortoiseSVN 客户端,而不是同时升级客户端和服务器吗?

(我已经尝试过——只需要使用“重新定位”功能从 svn:// 切换到 file://——但我想确保如果我将其保留为这样,不会有什么东西偷偷溜到我身上方式。)

I was reading the Red Bean book and noticed this paragraph:

Do not be seduced by the simple idea
of having all of your users access a
repository directly via file:// URLs.
Even if the repository is readily
available to everyone via a network
share, this is a bad idea. It removes
any layers of protection between the
users and the repository: users can
accidentally (or intentionally)
corrupt the repository database, it
becomes hard to take the repository
offline for inspection or upgrade, and
it can lead to a mess of file
permission problems (see the section
called “Supporting Multiple Repository
Access Methods”). Note that this is
also one of the reasons we warn
against accessing repositories via
svn+ssh:// URLs—from a security
standpoint, it's effectively the same
as local users accessing via file://,
and it can entail all the same
problems if the administrator isn't
careful.

I realized that, since I'm the only one accessing the repository, ever, none of these caveats seem to apply. Can I safely down svnserve then and only ever have to worry about upgrading my TortoiseSVN client, not both the client and the server whenever there's a new version out?

(I've tried it already--just needed to use the Relocate feature to switch from svn:// to file://--but I wanted to make sure something wouldn't be sneaking up on me if I left it this way.)

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

笑饮青盏花 2024-09-01 16:42:11

是的。如果您是唯一访问过该存储库的人,则这些警告不适用。

Yes. These warnings do not apply if you are the only one ever accessing the repository.

不必你懂 2024-09-01 16:42:11

我已经使用 SVN 与 Tortoise 和 Slik Subversion 客户端(使用单用户 file:// url)已有几年了,绝对零问题。但是,如果您曾经认为需要多用户访问,则需要使用其中一种服务器访问方法 - 不要试图将 file:// 存储库放在共享网络驱动器上。

I've been using SVN with Tortoise and Slik Subversion clients using the single-user file:// urls for a couple of years now, with absolutely zero problems. But if you ever, ever think you will need multi-user access, you need to use one of the server access methods - don't be tempted to put a file:// repository on a shared network drive.

与酒说心事 2024-09-01 16:42:11

我看到的一个潜在问题是 svn 和存储库之间存在一定程度的间接性,因此您可以移动存储库而不影响工作副本,而您无法使用文件 url。

即,如果您的存储库位于 /user/repos 中并且您运行

svnserve as svnserve --daemon --root /user ,

则用户将使用

svn://localhost/repos 访问文件>
如果稍后您必须将存储库更改为 /user2,您只需运行

svnserve --daemon --root /user2

即可,现有的签出代码仍然可以,但如果使用文件协议你将不得不重新定位你的文件。

One potential problem I see is with svn there is a level of indirection between you and the repository so that you maybe able to move a repository without it affecting working copies which you cant using the file url.

i.e if youre repository is in /user/repos and you ran

svnserve as svnserve --daemon --root /user

the user would access file using

svn://localhost/repos
if later on you have to use change the repository to now be in /user2 you can just run

svnserve --daemon --root /user2

and existing checkout code would still be ok, wheras if using file protocol you would have to relocate your files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文