Create some variables for clarity:
user=MyUserName
pass=MyPassword
newName='{"name": "NewNameForRepo"}'
oldName="MyRepo"
Then use curl to make the request:
curl -u "$user:$pass" -X PATCH -d "$newName" https://api.github.com/repos/$user/$oldName
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…