16 lines
449 B
Python
16 lines
449 B
Python
import requests
|
|
|
|
TOKEN = "357a9e69997259eace0e9a3167550a114d3587b9"
|
|
headers = {"Authorization": f"token {TOKEN}"}
|
|
|
|
# Параметры для нового репозитория
|
|
data = {
|
|
"name": "my-new-repo",
|
|
"private": False,
|
|
"description": "Мой новый репозиторий"
|
|
}
|
|
|
|
response = requests.post("https://git.vyatsu.ru/api/v1/user/repos", headers=headers, json=data)
|
|
|
|
print(response.status_code)
|
|
print(response.json()) |