NuGet packages Access Denied error during TeamCity Build - windows

When running a build configuration on our TeamCity server with,
Build Steps:
1. Delete NuGet packages folder
2. NuGet Installer - on this step we are getting multiple errors such as:
[restore] Access to the path '[absolute path]\packages\Microsoft.1.0.0\lib\AjaxControlToolkit.dll' is denied.
Most packages install successfully, but a few do not. Accessing the path through windows Explorer gives the error:
Location is not available
[absolute path]\packages\Microsoft.1.0.0\lib is not accessible.
Access is denied.
I have looked at the Sharing and security setting for the parent folders, but can't see any reason why access should be denied to some random folders. I recently made a Sharing change to a parent folder just before this error through:
properties > sharing > advanced sharing
but have since changed it back to the previous state.
Using:
TeamCity Enterprise 9.0.3
NuGet 2.8.3
Windows Server 2008 R2 Standard

Related

Three identical build server, same build script: "Unable to determine workspace" error only on one

We implemented three identical build servers and when we run the same script it fails on one of them with the following error:
Error: Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'.
The issue is identical to this one, so we probably need to add the tf workfold /map command:
FInalBuilder 7 and TFS2010 - Get Latest
Now the question is, if we need to add the command above, how it can run correctly many times on the other two build servers?
[Team Foundation Check Out [ C:\BuildAgent\work\27a5ec307fc309bf\Core\Geometry\Source ]]
Path to Executable: C:\Program Files (x86)\Microsoft Visual Studio\2017\TeamExplorer\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe
Workspace Directory: C:\BuildAgent\work\27a5ec307fc309bf\Core\Geometry\Source
Command line: checkout /lock:none "Properties\assemblyInfo.cs"
Error: Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'.
Failed!
The problem was a ghost workspace, I was able to delete it using Attrice Sidekick for TFS and the instructions found here: https://stackoverflow.com/a/37284964/261010

Visual Studio 2013 Publish Error - MSB3231 Unable to remove directory

In Visual Studio 2013 I am attempting to File Publish my website project to a remote web server. I am getting the following error:
C:\Program
Files\MSBuild\Microsoft\VisualStudio\v12.0\Web\Transform\Microsoft.Web.Publishing.AspNetCompileMerge.targets(720,5):
Error MSB3231: Unable to remove directory
"obj\Release\AspnetCompileMerge\TempBuildDir". Access to the path
'AdditionalPhotos.aspx' is denied.
I have tried cleaning and rebuilding, with no luck. Restarting VS did not help. I checked the permissions on the directory and file referenced in the error and Windows Explorer would not let me see the file and folder permissions (You do not have permission to view or edit this object's permission settings.) The project is stored on a network drive, and I am administrator of that drive, so I'm not sure why I can't see permissions there.
Any ideas as to how to get around this issue? Thanks for your help!

Have teamcity checkout on build agent machine

We have a team city server installed on a server named pluto. It's a Windows Server machine. There is a build agent on Pluto used to do VS related builds.
We have another build agent connected to this TeamCity server instance called YOSX, a build agent that is running on Mac mini Yosemite.
I've created a build to build a solution on YOSX with rake script. As a VCS Root Checkout option I've selected Automatically on Agent.
Ok, I am expecting that perforce p4 app will be called by TC agent on YOSX machine, but when I run a build, I get an error:
Collecting changes in 1 VCS root (2s)
[Collecting changes in 1 VCS root] VCS Root details
[VCS Root details] "eyeleo.mac.dev" {instance id=98, parent internal id=31, parent id=Desktop_EyeLeoMac_EyeleoMacDev, description: "perforce: p4.radacode.net:1666: perforce stream: '//EyeLeo.Mac/dev'"}
Failed to collect changes, error: Unable to find P4 command-line client at path '//Applications/p4' on pluto for user PLUTO$
Why is trying to checkout on pluto with user $PLUTO while I specifically set it to checkout on build agent's machine.
P.S. Yes, I've set the build requirements so that the build configuration in question is only compatible with YOSX build agent.
The server does not try to checkout the sources, but it still collects the information about changelists: modified files, commit messages etc.
This information will be used to display diffs, relevant issues, to track possible causes of test failures.
Please, install p4 on the PLUTO as well.
In my case p4 file on YOSX (build agent machine) was in PATH, but didn't have execute permissions. chmod +x p4 solved the puzzle.

Error creating git repos using Xcode/OS X Server

I recently installed OS X Server on a seperate machine and attempting to host some git repos. When I try to create a new project & remote repo with Xcode I get an error -
Could not connect to the remote repository because the server was unreachable.
If I attempt to configure it again after the project has been created I get this error -
Cannot create hosted Git repositories at path because path already exists: /Library/Developer/XcodeServer/HostedRepositories/SampleProject
Looking at the server - I can see the repos were actually created, but for some reason I can't connect/push to them. I have tried this on the machine running the server and another one on the same network with the same results. Is something not configured correctly or any way to get at a more detailed error?
Fixed it by going into the Xcode service repository settings and enabling SSH access.

Permissions and SVN Updates on Windows Server 2008: same folder & SVN account, different Active Directory users

We're experiencing strange permission issues with SVN after switching from Windows Server 2003 to Server 2008.
On our standard build box there is a folder (C:\SVN_Code_Folder) which AD_User_A associates with a SVN repository using SVN_User and TortoiseSVN 1.7.6
When using Windows 2003, when AD_User_B logs into the box and tries to Update, Switch, Merge the SVN_Code_Folder with SVN_User, the command is executed.
It Windows 2008, it fails with the message:
Command: Update
Error: Working copy 'C:\jboss-4.2.3.GA\server\New folder' locked
Error: sqlite: attempt to write a readonly database
Error: sqlite: attempt to write a readonly database
Completed!
Attempting to unlock the file, which was never locked, via the context menu is met with the following message:
There's nothing to unlock. No file has a lock in this working copy.
I've played with the permissions of the folder and I've discovered that giving "Domain Users" control over the folder fixes the issue, but I would prefer to not have such a broad permissions. I've tried granting the same permissions to individual users and a SVN-group, but these too did not work.
What am I missing?
Is this an improper use of SVN?
Can 2 different Domain users update a folder using SVN without removing the .SVN file?
For future reference...
I had this same problem with some WC's that I copied over to my new laptop's hard drive, from a file share on my old machine.
It turned out that the problem was solved by giving myself (as opposed to all domain users, or any other group) full control over the folder.
Did you check the svn service user on the win2008 machine?
Does that user have local administrator privileges and also have permission to these folders on c:?
After changing anything restart the service.
For me change folder permissions did't help, but I have update for several directories in a batch script so I solved this by
cmd -> Run as administrator -> start update script

Resources