使用到 Git 的 ForcePush 產生錯誤訊息
git push origin HEAD:master –force
看起來應該是權限不足
上去 Azure DevPos 找了一下設定
點選 Manage repositories
Force push (rewrite history, delete branches and tags) 設定為 Allow
PS.群組我選 Project Collection Administrators 視需求每人選的有所不同
#!/bin/bash
echo "== Ubuntu == run check-disk =="
team_url=【你 team 的 url】
alert=50
df -H | grep -vE '^Filesystem|tmpfs' | awk '{ print $5 " " $6 }' | while read output;
do
usepercent=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 )
partition=$(echo $output | awk '{ print $2 }' )
if [ $usepercent -ge $alert ]; then
if [ $partition = '/' ]; then
curl -H "Content-Type: application/json" -d "{\"text\":\"$(date) $(hostname) Disk Space Alert= $partition($usepercent%) \"}" $team_url
break
fi
fi
done
echo "== Ubuntu == stop check-disk =="
sudo apt-get update
sudo apt install curl
chmod +x check-disk.sh
0 0 * * * /home/ubuntu/check-disk.sh >> ~/disk.log
0 * * * * /home/ubuntu/check-disk.sh >> ~/disk.log
sudo timedatectl set-timezone "Asia/Taipei"
sudo service cron restart
參考文章: 覺得 Google 的 Blogger 不太順手?透過 HTML 的 iframe 移花接木 HackMD