File uploaded to assets through API has different permissions


#1

I try to upload zip file as assets, everything works fine but for some reason zip file has permissions different if I upload file manually through edit release and drag&drop.

This is command I used:

curl -H "Authorization: token <TOKEN>" -H "Content-Type: multipart/form-data;" -H "Content-Type: application/zip" --data-binary @/Users/appsflyer/workspace/ios_sdk_framework_test/AppsFlyerLib/AppsFlyerTracker.framework.zip --fail --silent --show-error ""https://uploads.github.com/repos/AppsFlyerSDK/AppsFlyerFWTestBuild/releases/5550807/assets"?name=AppsFlyerTracker.framework.zip"

As Response I get back following JOSN:

{
“url”: “https://api.github.com/repos/AppsFlyerSDK/AppsFlyerFWTestBuild/releases/assets/3259449”,
“id”: 3259449,
“name”: “AppsFlyerTracker.framework.zip”,
“label”: “”,
“uploader”: {
“login”: “af-builder”,
“id”: 22172769,
“avatar_url”: “https://avatars.githubusercontent.com/u/22172764?v=3”,
“gravatar_id”: “”,
“url”: “https://api.github.com/users/af-builder”,
“html_url”: “https://github.com/af-builder”,
“followers_url”: “https://api.github.com/users/af-builder/followers”,
“following_url”: “https://api.github.com/users/af-builder/following{/other_user}”,
“gists_url”: “https://api.github.com/users/af-builder/gists{/gist_id}”,
“starred_url”: “https://api.github.com/users/af-builder/starred{/owner}{/repo}”,
“subscriptions_url”: “https://api.github.com/users/af-builder/subscriptions”,
“organizations_url”: “https://api.github.com/users/af-builder/orgs”,
“repos_url”: “https://api.github.com/users/af-builder/repos”,
“events_url”: “https://api.github.com/users/af-builder/events{/privacy}”,
“received_events_url”: “https://api.github.com/users/af-builder/received_events”,
“type”: “User”,
“site_admin”: false
},
“content_type”: “multipart/form-data;”,
“state”: “uploaded”,
“size”: 849832,
“download_count”: 0,
“created_at”: “2017-02-23T16:10:25Z”,
“updated_at”: “2017-02-23T16:10:28Z”,
“browser_download_url”: “https://github.com/AppsFlyerSDK/AppsFlyerFWTestBuild/releases/download/4.6.497/AppsFlyerTracker.framework.zip
}

This file I created for Carthage (iOS) and Carthage fails to fetch it. See: https://github.com/Carthage/Carthage/issues/1782

I found that if:

  1. I download AppsFlyerTracker.framework.zip file manually from github
  2. delete it from release
  3. upload the same file through drag&drop
    Everything starts to work (from Carthage side).

So the reason is: Carthage don’t have permissions to download zip file for some reason through their API.

So where is a problem, do I something wrong?