Github 上正确的 VCS 用户名设置是什么,以便“我的更改”显示工作正常吗?
我为个人 GitHub 项目 设置了 TeamCity 持续构建流程,效果良好。但是,在 TeamCity 中,我想在“我的更改”(http://teamcity/changes.html
) 下查看提交列表。
在“VCS 用户名设置”(http://teamcity/vcsSettings.html
) 下,我已将用户名设置为“benpowell”以匹配我的 Github 帐户,如您所见 所有提交 都记录在该名称下。但是,没有任何提交记录在“我的更改”下。
有什么想法吗?
I have a TeamCity continuous build process setup for a personal GitHub project which works well. However, in TeamCity I want to see a list of commits under "My Changes" (http://teamcity/changes.html
).
Under "VCS Username Settings" (http://teamcity/vcsSettings.html
) I have set the username as "benpowell" to match my Github account and as you can see all commits are logged under that name. However, none of the commits are logged under "My Changes".
Any ideas why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
可能有帮助的一点是,TeamCity 在 VCS 根目录下有一个“用户名样式”设置。对于新安装的 TeamCity 9.0.1,它默认为“Userid”。我必须进去并将其更改为“作者电子邮件”。 注意 - 此设置隐藏在“高级选项”下。
根据屏幕显示,它只会影响从源新收集的更改。
完成此操作后,您应该能够成功使用 VCS 用户名下的电子邮件地址。
有关此设置的更多详细信息,请参阅屏幕截图:
One note that might help is that TeamCity has a "Username style" setting under the VCS root itself. For a new installation of TeamCity 9.0.1, it defaulted to just "Userid". I had to go in and change it to "Author Email". Note - this setting is hidden under "advanced options".
Per the screen, it will only affect newly collected changes from source.
Once this is done, you should be able to use email addresses under VCS Username successfully.
See the screenshot for more details on this setting:
要找到正确的 VCS 用户名,请打开 TeamCity 并查看您的构建。在最近历史记录下,您将看到一个名为更改的列,它链接到触发构建的提交/推送(如果您有持续集成设置)。
用户名显示在 中,如下所示:
值得注意的是,该用户名似乎链接到我的电子邮件地址。这是我的 Gmail 地址的用户名部分。我假设 Github 提取了该用户名,因为我个人不会选择该用户名。
To find the correct VCS username open up TeamCity and view your build. Under Recent History you'll see a column that is called Changes, which links to the commit/push that triggered the build (if you have continuous integration setup).
The username is shown there as seen below in the :
Notably, the username does appear to be linked to my email address. It is the username part of my Gmail address. I'm assuming Github extracted that, because I wouldn't have chosen that username personally.
我遇到了类似的问题,发现这篇文章很有帮助。三件事决定了您对 git 的提交和 TeamCity 中的构建信息之间的用户绑定:
git config user.name
,以及user.email
)。这就是 git 标记你的提交的方式。例如,假设用户的本地克隆 git 身份为 user.name
JCoder
和 user.email[电子邮件受保护]
(上面#1),以及UserId
的用户名样式(#2)上面,以及一个具有名称Joseph Coder
和版本控制用户名的 TeamCity 帐户上面joe.coder
(#3) 的设置。TeamCity 会正确将此用户的更改(例如,在构建历史记录中)归因于 TeamCity 用户
Joseph Coder
。这是因为UserId
的 UserName Style 通过使用 user.email、joe 的电子邮件前缀在 git 和 TeamCity 用户之间进行映射。在本例中是编码器。请注意,有多种用户名样式(映射样式)。我坚持使用
UserId
因为它使用电子邮件地址,这通常是最稳定的标识符。I had a similar problem and found this post helpful. There are three things that determine the user bindings between your commits to git and build information in TeamCity:
git config user.name
, and alsouser.email
). This is how git stamps your commits.So, for example, assume a user has a local clone git identity of user.name
JCoder
and user.email[email protected]
(#1 above), and UserName Style ofUserId
(#2) above, and a TeamCity account with the NameJoseph Coder
and Version Control Username Setting ofjoe.coder
(#3) above.TeamCity will correctly attribute this user's changes (in build history, for example) to the TeamCity user
Joseph Coder
. This is because the UserName Style ofUserId
maps between git and TeamCity users by using the email prefix of user.email,joe.coder
in this case. Note that there are several Username Styles (mapping styles). I stick withUserId
because it uses the email address which is typically the most stable identifier.使用 GitHub,您需要将提交中使用的电子邮件地址添加到您的 GitHub 帐户,以便将它们视为您的提交。
With GitHub you need to add the email address used in the commits to your GitHub account for it to see them as your commits.