使用 curl 上传 source map 到 getsentry 失败

Using curl to upload source map to getsentry failed

https://github.com/getsentry/sentry/issues/2513

curl https://app.getsentry.com/api/0/projects/instawork/production/releases/:version/files/ -u [:api_key]: -X POST -F file=@webpack.js.map -F name="https://www.instawork.com/static/js/webpack.js.map"

我收到以下错误:$ curl: (26) 无法打开文件 "webpack.js.map"

这已在链接的 GitHub 问题中得到解决——您的用户可能没有 "webpack.js.map" 文件的读取权限。

我在这里犯了 2 个错误:

  1. 从我的本地文件系统上传时, -F file=@"aaa/xxxx.map" 'aaa' 需要是我要上传的文件的完整路径。例如。 Users/name/mydir/

  2. 如@ehfeng 所述。还需要确保我有权限。