stephen_bailey
09/08/2021, 7:31 PMtap-github
and struggling to submit an authorized request. I can access private data via Postman and curl with curl --request GET '<https://api.github.com/repos/immuta/my-private-repo/commits|https://api.github.com/repos/immuta/bodata/commits>' \
--header 'authorization: token <mytoken>'
. But I get a "not authorized" when adding the header via requests / the tap.
what's more is that it looks like requests is adding its own Basic
authorization to the request payload instead of honoring the passed-in token. Has anyone seen this before?
import requests
resp = requests.get(
"<https://api.github.com/repos/immuta/my-private-repo/commits>",
headers={"Authorization": "token foo"},
)
print(resp.request.headers)
> {'User-Agent': 'python-requests/2.22.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Basic L1VzZXJzL25vdG91Y2gtaG90c3BhcmU6L1VzZX5vdG91Y2gtaG90c3BhcmU='}
The basic authorization toekn, decoded, is my-mac-user:my-mac-user
🤨 Where is that coming from??aaronsteers
09/08/2021, 7:37 PMsinger-io
fork, right? No, I haven't seen anything like that.stephen_bailey
09/08/2021, 7:45 PMstephen_bailey
09/08/2021, 7:45 PMrequests
itself, because it's just not respecting the headers i'm passing in...stephen_bailey
09/08/2021, 7:48 PMresponse.request.headers
it's just sanitizing it. at any rate, i can't auth to work and its making me try not to crylaurent
09/08/2021, 9:01 PMsinger-io
tap, and so decided to bite the bullet and move over to the MeltanoLabs
one instead. I am adding in the streams that I need, but overall the foundations are A LOT stronger.stephen_bailey
09/08/2021, 9:18 PMstephen_bailey
09/08/2021, 9:30 PMedward_ryan
09/09/2021, 6:34 PMstephen_bailey
09/09/2021, 7:35 PM