wget and fetch does not work with app password

XMLWordPrintable

    • 2
    • Severity 2 - Major
    • 73

      Issue Summary

      Utilities like 'wget', 'fetch' (FreeBSD based utility) don't work when downloading content from Bitbucket account using app-password on private repositories.

      The following two combinations doesn't work at this time:

      • wget + app_password + downloading_file_from_Private_Repo
      • fetch + app_password + downloading_file_from_Private_Repo

      Steps to Reproduce

      wget --user=<user name> --password=<App password> -S "https://bitbucket.org/<Repo_Owner>/<Repo_Slug>/downloads/<filename>" -O "<filename>" 
      
      fetch -vvo - https://<username>:<app_password>@api.bitbucket.org/2.0/repositories/<account_name>/<repo_name>/src/master/<filename>
      
      • 'wget' and 'fetch' both doesn't work with App password or HTTPS password with API endpoints for Private repos and returns "ERROR 403: Forbidden" irrespective of valid or invalid authentications.

      Workaround

      1. Use Curl command with App password and API endpoints:

      curl -u <user_name>:<App_Pwd> -S -L "https://api.bitbucket.org/2.0/repositories/<Repo_Owner>/<Repo_Slug>/downloads/<filename>" --output "<filename>" 

      2. Use wget with option "--auth-no-challenge":

      wget --http-user <username> --password <app-password> --auth-no-challenge https://api.bitbucket.org/2.0/repositories/<owner>/<repo-slug>/<path-to-file>

      It currently works with 'api.bitbucket.org'

      Working Combinations:

      • wget + normal_password + downloading_file_within_repository (Private/Public Repo)
      • wget + app_password + downloading_file_within_repository (Public Repo)
      • fetch + normal_password + downloading_file_within_repository (Private/Public Repo)
      • fetch + app_password + downloading_file_within_repository (Public Repo)

            Assignee:
            Unassigned
            Reporter:
            Dheeraj (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: