Installing p12 certificate under Local System Account (Windows Server 2008)
I'm running TeamCity 5.1 on a Windows 2008 server. TeamCity runs under the Local System Account (LSA) per default.
I checkout a Visual Studio 2010 project that contain a p12 certificat. I build the project using the solution file (sln).
The build fails with the following error message:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1970, 9): error MSB3326: Cannot import the following key file: . The key file may be password protected. To correct this, try to import the certificate again or import the certificate manually into the current user’s personal certificate store.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1970, 9): error MSB3321: Importing key file "cert.p12" was canceled.
So I use the Certificates.msc to import the certificate into the Personal section of Certificates - Service (TeamCity Build Agent Service) on Local Computer under TCBuildAgent\Personal\Certificates.
That does not resolve the issue.
So (in irritated frenzy) I install the certificates in every store i can find, but nothing (positive) happens.
I then try installing the certificate under LSA using the tool PsExec, but nothing is resolved.
So what am I doing wrong? Obviously I cannot brute force solve this one Any help is much appreciated!
Please sign in to leave a comment.
Please try do the following:
- make build agent service running under some existing administrative account
- log in to this account and check the is running from commandline
- install sertificate there if required
- try again
Does it help?
I was having the same issue and these steps solved it.
I am running into the same issue
See below:
Please try do the following:
- make build agent service running under some existing administrative account
Nat>> It is running under admin account. When I open the solution in VS2012 on the build machine and build it builds fine.
- log in to this account and check the is running from commandline
Nat>> Did not follow this step ..can you explain?
- install sertificate there if required
Nat>> Install where?
- try again
Does it help?