mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-18 15:56:47 +00:00
update ssh-keyscan in msys2 script
This commit is contained in:
@@ -36,13 +36,5 @@ Choco-Install -PackageName hub
|
|||||||
# Disable GCM machine-wide
|
# Disable GCM machine-wide
|
||||||
[Environment]::SetEnvironmentVariable("GCM_INTERACTIVE", "Never", [System.EnvironmentVariableTarget]::Machine)
|
[Environment]::SetEnvironmentVariable("GCM_INTERACTIVE", "Never", [System.EnvironmentVariableTarget]::Machine)
|
||||||
|
|
||||||
if (Test-IsWin16) {
|
|
||||||
$env:Path += ";$env:ProgramFiles\Git\usr\bin\"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add well-known SSH host keys to ssh_known_hosts
|
|
||||||
ssh-keyscan -t rsa github.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts"
|
|
||||||
ssh-keyscan -t rsa ssh.dev.azure.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts"
|
|
||||||
|
|
||||||
Invoke-PesterTests -TestFile "Git" -TestName "Git"
|
Invoke-PesterTests -TestFile "Git" -TestName "Git"
|
||||||
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "Hub CLI"
|
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "Hub CLI"
|
||||||
|
|||||||
@@ -84,8 +84,15 @@ $pathValue = Get-ItemPropertyValue -Path $regEnvKey -Name 'Path'
|
|||||||
$pathValue += ";C:\msys64\mingw64\bin;C:\msys64\usr\bin"
|
$pathValue += ";C:\msys64\mingw64\bin;C:\msys64\usr\bin"
|
||||||
Set-ItemProperty -Path $regEnvKey -Name 'Path' -Value $pathValue
|
Set-ItemProperty -Path $regEnvKey -Name 'Path' -Value $pathValue
|
||||||
|
|
||||||
# Add well-known SSH host keys to ssh_known_hosts
|
# Add well-known SSH host keys to ssh_known_hosts to Msys2
|
||||||
ssh-keyscan -t rsa github.com >> "C:\msys64\etc\ssh\ssh_known_hosts"
|
ssh-keyscan -t rsa github.com >> "C:\msys64\etc\ssh\ssh_known_hosts"
|
||||||
ssh-keyscan -t rsa ssh.dev.azure.com >> "C:\msys64\etc\ssh\ssh_known_hosts"
|
ssh-keyscan -t rsa ssh.dev.azure.com >> "C:\msys64\etc\ssh\ssh_known_hosts"
|
||||||
|
|
||||||
|
# Add well-known SSH host keys to ssh_known_hosts to Git
|
||||||
|
if (Test-Path "C:\Program Files\Git\etc\ssh")
|
||||||
|
{
|
||||||
|
ssh-keyscan -t rsa github.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts"
|
||||||
|
ssh-keyscan -t rsa ssh.dev.azure.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts"
|
||||||
|
}
|
||||||
|
|
||||||
Invoke-PesterTests -TestFile "MSYS2"
|
Invoke-PesterTests -TestFile "MSYS2"
|
||||||
|
|||||||
Reference in New Issue
Block a user