Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $username = "uname"
- $password = "pword"
- $boundary = [guid]::NewGuid().ToString().Replace("-", "").Substring(0, 16)
- $enc = [System.Text.Encoding]::GetEncoding("utf-8")
- $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))
- $headers = @{}
- $headers.Add("Host", "api.bitbucket.org")
- $headers.Add("Authorization", "Basic $base64AuthInfo")
- $repoResult
- $repoResult = Invoke-WebRequest -Uri "https://bitbucket.org/teamAccount/repoName/get/master.zip" -Method GET -Verbose -OutFile .output.zip #-Method GET -Headers $headers -Verbose
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement