Skip to content

Instantly share code, notes, and snippets.

@dakcarto
Created November 15, 2018 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dakcarto/704decee4ee30178fe91133598dd3912 to your computer and use it in GitHub Desktop.
Save dakcarto/704decee4ee30178fe91133598dd3912 to your computer and use it in GitHub Desktop.
D, [2018-11-14T17:04:15.237274 #35579] DEBUG -- net.ssh.authentication.methods.publickey[8380e6b0]: publickey succeeded (74:5f:a4:26:e8:b9:7d:cd:e2:5a:79:a8:48:21:4f:7a)
DEBUG winssh: == Net-SSH connection debug-level log END ==
DEBUG winssh: Base SSH exec command: powershell -File C:\Windows\Temp\vagrant-ssh20181114-35579-14wzu48.ps1
DEBUG winssh: stderr: File C:\Windows\Temp\vagrant-ssh20181114-35579-14wzu48.ps1 cannot be loaded because running
DEBUG winssh: stderr: scripts is disabled on this system. For more information, see about_Execution_Policies at
DEBUG winssh: stderr: https:/go.microsoft.com/fwlink/?LinkID=135170.
DEBUG winssh: stderr: + CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
DEBUG winssh: stderr: + FullyQualifiedErrorId : UnauthorizedAccess
DEBUG winssh: Exit status: 1
ERROR warden: Error occurred: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
function Test-ReparsePoint([string]$path) {
$file = Get-Item $path -Force -ea 0
return [bool]($file.Attributes -band [IO.FileAttributes]::ReparsePoint)
}
$MountPoint = [System.IO.Path]::GetFullPath("/vagrant")
$ShareName = "-vagrant"
$VmProviderUncPath = "\\vmware-host\Shared Folders\-vagrant"
# https://github.com/BIAINC/vagrant-windows/issues/4
# Not sure why this works, but it does.
& net use $ShareName 2>&1 | Out-Null
Write-Debug "Attempting to mount $ShareName to $MountPoint"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment