BITS transfer with github

This topic contains 1 reply, has 2 voices, and was last updated by  Don Jones 4 months, 4 weeks ago.

  • Author
    Posts
  • #70991

    Y
    Participant

    Hi,

    I'm trying to use BITS transfer to get binary files (release) from github.
    However, I always get a 403 error. For instance:

    PS> Start-BitsTransfer -Source https://github.com/Microsoft/MIMWAL/releases/download/v2.17.0414.0/MIMWAL-2.17.0414.0.zip C:\tmp\foo.zip
    Start-BitsTransfer : HTTP status 403: The client does not have sufficient access rights to the requested server object.
    At line:1 char:1
    + Start-BitsTransfer -Source https://github.com/Microsoft/MIMWAL/releases/download ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Start-BitsTransfer], Exception
        + FullyQualifiedErrorId : StartBitsTransferCOMException,Microsoft.BackgroundIntelligentTransfer.Management.NewBits
       TransferCommand
    

    It is working fine with WebClient:

    > $wc = New-Object System.Net.WebClient
    > $wc.DownloadFile("https://github.com/Microsoft/MIMWAL/releases/download/v2.17.0414.0/MIMWAL-2.17.0414.0.zip","C:\tmp\foo.zip")
    > Test-Path "C:\tmp\foo.zip"
    True
    

    Do you see any reason why it does not work with BITS?

  • #71168

    Don Jones
    Keymaster

    That is weird. Unfortunately, BITS is a little opaque. It's clearly doing something different, but I'd need to do, like, a packet capture to compare the two and see what was up.

You must be logged in to reply to this topic.