1
我想從一個shell腳本中獲取Redmine的CSV文件。 WGET抱怨不能接受。任何想法是什麼神奇的咒語,或如何找到它?WGET一個Redmine的CSV文件
$ wget --no-check-certificate --accept csv https://username:[email protected]/redmine/issues.csv?utf8=%E2%9C%93&columns=all&description=1
Resolving company.com (company.com)... 192.168.1.45
Connecting to company.com (company.com)|192.168.1.45|:443... connected.
WARNING: The certificate of ‘company.com’ is not trusted.
WARNING: The certificate of ‘company.com’ hasn't got a known issuer.
HTTP request sent, awaiting response... 406 Not Acceptable
2017-04-04 10:14:20 ERROR 406: Not Acceptable.
沒有運氣。請注意,我可以在Firefox中請求URL並彈出下載對話框。請求中還有什麼我應該做的? –
那麼你可以嘗試刪除--accept csv。 --accept參數強制wget只接受csv文件。在這種情況下似乎沒有必要。以下是有關wget命令給出的406錯誤的更多信息:https://httpstatuses.com/406 –