-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automating downloads from launchpad with CI #28
Comments
BASIC_AUTH="$(echo -n "${SAP_USER_ID}:${SAP_PASSWORD}" | base64)"
curl -L -v -b cookies.txt \
-H "Authorization: Basic $BASIC_AUTH" \
-o "download.file" \
"https://softwaredownloads.sap.com/file/${SAP_FILE_ID}" this is the magic i am using |
Hm, that's strange. I just ran a little test on my end using exactly the script you provided and I can download 2011.8 without a hitch. Some food for thought:
A couple of redirects until the download actually starts are expected though. SAP_USER_ID='S0123456789'
SAP_PASSWORD='<redacted>'
SAP_FILE_ID='0020000000820402021'
curl -L -v -b cookies.txt \
-u "$SAP_USER_ID:$SAP_PASSWORD" \
-o "download.file" \
"https://softwaredownloads.sap.com/file/${SAP_FILE_ID}" |
here is the strange thing, the basic auth header, the url everything is the same when i am inspecting the log closely. So i do not assume it has something to do with the Script or the data. This is the log from locally:
compared to CI system:
Might this be related to the machines hosted in GCP and a special treatment on Akamai?
i even tried to do the login via curl and mimic the redirect functionality, but that is not as easy as i hoped it will be. (after providing the j_username i get an error that it was not successful, and i should clean everything and start over) Worst case i thought about tunneling my request through another machine, eg. mine to see if this works, to verify my GCP IP theory - but that is some effort, i am not sure i currently have time for :) |
At that stage, your guess is as good as mine. But maybe there is some IP filtering going on, I honestly don't know. For me at takes 2 redirects until I end up at the file. Do you cache any cookies by chance? |
I hope that you maybe can tell me a fancy header to bypass this ;)
I will see if I find a workaround. And I will also add here my progress, if
I make some (hopefully)
Thank you for your input.
…On Fri, Jun 25, 2021, 12:32 Markus Perndorfer ***@***.***> wrote:
At that stage, your guess is as good as mine.
But maybe there is some IP filtering going on, I honestly don't know.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACMGKQR34JSCBL4MM2ELSZ3TURLNFANCNFSM47FCVNIA>
.
|
it seems like i managed to bypass this by first calling the token endpoint manually.
|
as i found i workarround i close this ticket - thank you @mpern for your support |
Thank you for taking the time to find a workaround. One other thing came to mind: Try using Background: |
I am not sure if this is even the right place to ask, if not, please let me know, where i should instead ask :)
I want to download the SAP Commerce artifacts via CI so i can easier distribute them with my co workers. We are using a Package Registry tool for storing most of our artifacts. To reduce the overhead, we thought it is a good ides to use our CI infrastructure to download via CURL and store it in the Package registry.
Sadly this seems to be not working, i assume it is related to our infrastructure within GCP. But if i use the same docker image locally for downloading, i have no issues at all downloading. But if i use it with the CI system, i am always redirected to a page via AkamaiGHost and my first request is a
Temporarly Moved
request.I thought i ask here based on https://github.com/SAP/commerce-gradle-plugin/blob/master/docs/FAQ.md#faq - as this was my main orientation for the tooling. Maybe somebody else already had this problem, and found a solution.
Thank you
The text was updated successfully, but these errors were encountered: