ubuntu resolute

This commit is contained in:
Maxime KINTS
2026-05-16 23:42:06 +02:00
commit c0f607fa0b
944 changed files with 112243 additions and 0 deletions

34
PS1/newrepo.ps1 Normal file
View File

@@ -0,0 +1,34 @@
# Définir l'URL de l'API
$apiUrl = "https://localhost/action/newrepo"
# Définir les données du dépôt à créer
$repoName = "REPONAME" # Remplacez par le nom du dépôt que vous souhaitez créer
$apiKey = "TOKEN" # Remplacez par votre clé API si nécessaire
# Créer les données à envoyer dans le corps de la requête
$body = @{
repoName = $repoName
}
# Convertir les données en JSON
$jsonBody = $body | ConvertTo-Json
# Ignorer les erreurs de certificat SSL non valide
Add-Type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
# Envoyer la requête POST à l'API
$response = Invoke-RestMethod -Uri $apiUrl -Method Post -Body $jsonBody -ContentType "application/json" -Headers @{ "x-api-key" = $apiKey }
# Afficher la réponse de l'API
$response | Format-List