简体   繁体   English

每次开发人员从TFS变通方法中退出分支时,都必须重新输入PFX密码吗?

[英]Must Reenter PFX Password Every Time Developer Pulls Branch from TFS Workaround?

11 of the DLLs in my solution must use PFX certificates (very large enterprise application using Click-Once install). 解决方案中的11个DLL必须使用PFX证书(使用Click-Once安装的大型企业应用程序)。 The certificates work perfectly, except every time someone pulls down a TFS branch from a different developer/workstation the certificate password is invalid and they receive: 证书可以正常工作,除非每次有人从不同的开发人员/工作站下拉TFS分支时,证书密码都是无效的,并且他们收到:

Error Cannot import the following key file: CertificateName.pfx. 错误无法导入以下密钥文件:CertificateName.pfx。 The key file may be password protected. 密钥文件可能受密码保护。 To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_DB583A44F66CCF4B AssemblyName 若要更正此问题,请尝试再次导入证书或使用以下密钥容器名称将证书手动安装到“强名称” CSP:VS_KEY_DB583A44F66CCF4B AssemblyName

Forcing them to reenter the same password for all 11 assemblies [image below]. 强制他们为所有11个程序集重新输入相同的密码 [下图]。 What is a solution/fix for this very time consuming rigmarole? 对于这种非常耗时的钻框,有什么解决方案/解决方案?

在此处输入图片说明

I do understand that entering the same password from a different workstation uses local values producing technically a different key, but I'm sure I'm not the first person to have this problem. 我确实知道从其他工作站输入相同的密码会使用本地值,从技术上讲会产生不同的密钥,但是我确定我不是第一个遇到此问题的人。

This was solved by blocking the .pfx files from being checked-in and brought down from TFS. 通过阻止检入.pfx文件并将其从TFS中删除,可以解决此问题。 Three potential solutions emerged: 出现了三个潜在的解决方案:

  1. Forbidden Pattern Policy using Server TFS Power Tools. 使用Server TFS Power Tools的禁止模式策略

    stackoverflow.com/questions/2741412/forbidden-patterns-check-in-policy-in-tfs-2010 stackoverflow.com/questions/2741412/forbidden-patterns-check-in-policy-in-tfs-2010

    msdn.microsoft.com/en-us/library/gg475890%28v=vs.100%29.aspx msdn.microsoft.com/zh-CN/library/gg475890%28v=vs.100%29.aspx

  2. TFS 'Cloaking' TFS“冒充”

    stackoverflow.com/questions/29808807/how-to-cloak-directories-in-tfs-command-line stackoverflow.com/questions/29808807/how-to-cloak-directories-in-tfs-command-line

    MSDN - Cloaking in TFS MSDN-隐藏在TFS中

  3. .tfignore (the chosen solution) .tfignore (所选解决方案)

    AIS Blog - excluding-files-from-team-foundation-version-control-using-tfignore-files AIS博客-使用tfignore文件从团队基础版本控制中排除文件

In the end, .tfignore I found to be the best solution. 最后,我发现.tfignore是最好的解决方案。 The .tfignore was automatically generated by Selecting the 'Detected changes link' in the Excluded section of Pending Changes Page, then choosing Ignore by extension (*.pfx) from the PFX file's shortcut menu. .tfignore是自动生成的,方法是:在“待定更改”页面的“排除”部分中选择“检测到的更改链接”,然后从PFX文件的快捷菜单中选择按扩展名忽略 (* .pfx)。

The .tfignore was introduced to the root of the mapped workspace so this rule would be immediately applied to every developer's workspace on next pull from TFS. .tfignore被引入到映射工作空间的根目录,因此在从TFS下次提取时,此规则将立即应用于每个开发人员的工作空间。

    ################################################################################
# This .tfignore file was automatically created by Microsoft(R) Visual Studio.
#
# Local items matching filespecs in this file will not be added to version
# control. This file can be checked in to share exclusions with others.
#
# Wildcard characters are * and ?. Patterns are matched recursively unless the
# pattern is prefixed by the \ character.
#
# You can prepend a path to a pattern to make it more specific. If you do,
# wildcard characters are not permitted in the path portion.
#
# The # character at the beginning of a line indicates a comment.
#
# The ! prefix negates a pattern. This can be used to re-include an item after
# it was excluded by a .tfignore file higher in the tree, or by the Team
# Project Collection's global exclusions list.
#
# The / character is interpreted as a \ character on Windows platforms.
#
# Examples:
#
#  # Excludes all files ending in .txt in Alpha\Beta and all its subfolders.
#  Alpha\Beta\*.txt
#
#  # Excludes all files ending in .cpp in this folder only.
#  \*.cpp
#
#  # Excludes all files ending in .cpp in this folder and all subfolders.
#  *.cpp
#
#  # If "Contoso" is a folder, then Contoso and all its children are excluded.
#  # If it is a file, then only the "Contoso" in this folder is excluded.
#  \Contoso
#
#  # If Help.exe is excluded by a higher .tfignore file or by the Team Project
#  # Collection global exclusions list, then this pattern re-includes it in
#  # this folder only.
#  !\Help.exe    
#
################################################################################

*.pfx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM