1

I have checked nearly everything. My .netric file is in the home directory and it is in the right format. My secret key has download:read checked off when I made it, but still, every time I want to download the podfile, it gives me this error:

[!] Error installing Mapbox-iOS-SDK
[!] /Users/walidsheykho/opt/anaconda3/bin/curl -f -L -o /var/folders/tm/<folder details>/file.zip https://api.mapbox.com/downloads/v2/mobile-maps/releases/ios/packages/6.3.0/mapbox-ios-sdk-dynamic.zip --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.11.2 cocoapods-downloader/1.4.0'

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 401 Unauthorized

I haven't had much experience downloading pods through flutter, so that might be the reason but it still didn't work even after I closed flutter and entered the directory on its own. What should I do?

Jhakiz
  • 1,519
  • 9
  • 16
ShmoonMaster
  • 51
  • 1
  • 2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 02 '21 at 22:41

2 Answers2

2
  1. Create a file named .netrc in your home directory, if it doesn't already exist. To check if it exists, perform step 2. and 3, otherwise proceed with the steps below.

  2. Open home directory in terminal

    cd 
    
  3. Create .netrc file

    touch .netrc
    
  4. Open .netrc file

    open .netrc
    
  5. When the file is open, copy/paste this and set your secret password:

    machine api.mapbox.com

    login mapbox

    password REPLACE_WITH_YOUR_SECRET_MAPBOX_ACCESS_TOKEN

  6. Save the file

Sharon Atim
  • 1,777
  • 16
  • 12
1

I've got the same issue. The documentation says:

Create a file named .netrc in your home directory if it doesn’t already exist, then add the following lines to the end of the file

machine api.mapbox.com
  login mapbox
  password PRIVATE_MAPBOX_API_TOKEN

For more infos, please visit the package's documentation

Check this link for How do you create a .netrc file?

Jhakiz
  • 1,519
  • 9
  • 16