Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate 04-git-server setting-up-server (Originally #114 ) #223

Conversation

oldsharp
Copy link
Contributor

Refer to #114 .

@networm networm mentioned this pull request Aug 11, 2015
95 tasks
@networm networm added this to the v1.0.0 milestone Aug 11, 2015
Revise the setting-up-server section based on the advice of three
public review records.
Revise the setting-up-server section based on my own opinions.

You should note that currently all these users can also log into the server and get a shell as the ``git'' user. If you want to restrict that, you will have to change the shell to something else in the `passwd` file.
需要注意的是,目前所有(获得授权的)开发者用户都能以系统用户 `git` 的身份登录服务器从而获得一个普通 shell。
如果你想对此加以限制,则需要修改 `passwd` 文件中(`git` 用户所对应)的 shell 值。
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此处译文换行与原文不同,因为参照了最新的 progit2 原文。所以整个文件会比原文件多出一行。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前貌似在哪里看过……现在的中文版对应的英文原文是 2014 年 12 月的版本,嗯现在它也改了非常多了。
比如我看过一篇,其中说到 Maven/Gradle(抱歉,Android Studio 使用它们所以我经常混淆了它们) 的 jar 依赖的,原文(也是当时的官方说法)说指定版本号用 +,现在官方已经将 + 给 deprecate 了,原文也改了,但是中文版就仍然还是原来的样子。
某个 Issue 里面也有说到这个问题,刚刚居然找不到。
要维持旧版本,还是使用新版本?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Geno1024 这个不是要在修订的时候统一一下么?

@oldsharp
Copy link
Contributor Author

@networm 修订工作已经完成。

@oldsharp
Copy link
Contributor Author

#114 (comment) 中提到的问题,在最新的 progit2 中已经被统一。所以我最后修订的时候也参照最新原文将其统一了。

@oldsharp
Copy link
Contributor Author

@secondwtq @IceNature @jeffsui 请检查。

Backport the upstream fix ( progit/progit2#358 ).
For instance, you can restrict the Git commands that the server will accept or you can customize the message that users see if they try to SSH in like that.
Run `git help shell` for more information on customizing the shell.(((git commands, help)))
现在,网络相关的 Git 命令依然能够正常工作,但是开发者用户已经无法得到一个普通 shell 了。
正如输出信息所提示的,你也可以在 `git` 用户的家目录下建立一个目录,来对 `git-shell` 命令进行一定程度的自定义。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得 home directory 翻译为 家目录 有些别扭(我大概只在机翻出来的东西里面见过这种说法),主目录 可能更好一点。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不翻译或者翻译为“用户目录”。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://zh.wikipedia.org/wiki/%E5%AE%B6%E7%9B%AE%E5%BD%95

“home directory”翻译为“家目录”不是机器翻译哦,是一个约定俗成的翻译,不过一开始确实是港台那边的译法,所以乍一看确实会感觉别扭。
其他的选择,“主目录”、“用户目录”等,其实仔细品味一下,确实不如“家目录”传神(我个人感觉)。另外的例子比如“fork”译成“复刻”,也是个很生动的译法,也是港台那边的译法传过来的 :-)
我的意见是保留下这个翻译,不过如果最后决定选择其他方案,最后全书统一修订时处理一下就 OK。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那这个事情记录在 WIKI 中吧,要不然之后可能会忘。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

另外,这个主要需要参考 Unix 类的书籍,看看它们翻译成什么。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@networm 已记录在 wiki。

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,同意 “用户目录”的说法

@secondwtq
Copy link
Contributor

@oldsharp 已检查,修订版本感觉很通顺了,少数意见已经发了 line note。

@oldsharp
Copy link
Contributor Author

@secondwtq 针对你的建议做了修订。请检查。

@secondwtq
Copy link
Contributor

@oldsharp 检查完毕,没有发现问题。

借助一个名为 `git-shell` 的受限 shell 工具,你可以方便地将用户 `git` 的活动限制在与 Git 相关的范围内。该工具随 Git 软件包一同提供。
如果将 `git-shell` 设置为用户 `git` 的登录 shell(login shell),那么用户 `git` 便不能获得此服务器的普通 shell 访问权限。
若要使用 `git-shell`,需要用它替换掉 bash csh,使其成为系统用户的登录 shell
为进行上述操作,首先你必须将 `git-shell` 添加到 `/etc/shells` 文件中,如果该条目还不存在的话:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

首先你必须将 git-shell 添加到 /etc/shells 文件中,如果该条目还不存在的话=>如果 git-shell 不在 /etc/shells 文件中的话,你必须将它添加进去

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最终译为

为进行上述操作,首先你必须确保 `git-shell` 已存在于 `/etc/shells` 文件中:

@IceNature
Copy link
Contributor

@oldsharp 已完成,就一个

@oldsharp
Copy link
Contributor Author

@IceNature 修订完成,请检查。

@IceNature
Copy link
Contributor

@oldsharp 检查一遍没有问题了,辛苦

@oldsharp
Copy link
Contributor Author

@IceNature thanks.

@oldsharp
Copy link
Contributor Author

@networm ready to merge.

networm added a commit that referenced this pull request Aug 14, 2015
…tting-up-server-original-pull-114

Translate 04-git-server setting-up-server (Originally #114 )
@networm networm merged commit bf594bf into progit:master Aug 14, 2015
@networm
Copy link
Member

networm commented Aug 14, 2015

@oldsharp @secondwtq @IceNature @jeffsui @Geno1024 @oranzhang 已合并入主干。

@oldsharp oldsharp deleted the pull/translate/04-git-server/setting-up-server-original-pull-114 branch August 14, 2015 15:42
OlingCat pushed a commit to OlingCat/progit2-zh that referenced this pull request Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants