25 lines
835 B
PowerShell
25 lines
835 B
PowerShell
$headers = @{
|
|
'Authorization' = 'token 9ed750a7f1480481ff96f021c8bbf49836b902f8'
|
|
'Content-Type' = 'application/json'
|
|
}
|
|
|
|
$body = @{
|
|
name = 'SignageHTML'
|
|
description = 'Digital signage system for displaying transit departures, weather information, and news tickers'
|
|
private = $false
|
|
} | ConvertTo-Json
|
|
|
|
try {
|
|
$response = Invoke-RestMethod -Uri 'http://192.168.68.53:3000/api/v1/user/repos' -Method Post -Headers $headers -Body $body
|
|
Write-Host "Repository created successfully!"
|
|
Write-Host "Repository URL: $($response.clone_url)"
|
|
Write-Host "SSH URL: $($response.ssh_url)"
|
|
$response | ConvertTo-Json -Depth 10
|
|
} catch {
|
|
Write-Host "Error: $($_.Exception.Message)"
|
|
if ($_.ErrorDetails.Message) {
|
|
Write-Host "Details: $($_.ErrorDetails.Message)"
|
|
}
|
|
Write-Host $_.Exception
|
|
}
|