다음을 통해 공유


GitHub clone falls victim to MAX_PATH

I was cloning a GitHub repo with Visual Studio. It was doing fine but then generated this error.

Error encountered while cloning the remote repository: Failed to stat file 'C:/Users/zakramer/Documents/GitHubVisualStudio/azure-powershell/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/SessionRecords/Microsoft.Azure.Commands.ApiManagement.Test.ScenarioTests.ApiManagementTests/TestImportApiManagementHostnameCertificate.json': The data area passed to a system call is too small.

I retried a few times and then it hit me...could this be due to the path length?

I counted up the characters in the path...266. That is 6 more than MAX_PATH. I am always amazed and confused when I run into a MAX_PATH limit. Hopefully this will help anyone else that runs into this cryptic error!