I am working on a bash script to get data from the github by hitting the API using curl and this is quite straight forward. However the authentication mechanism we have in our github servers makes this intricate.
Here is the situation :
* The github uses SSO / SAML / opensso for authentication.
* When a user tries to authenticate, it redirects the user to the SSO page and it uses the system certificate to authenticate
* After successfully authenticating, it redirects back to the github page
When I try "curl'ing" the URL, it redirects to SSO. So I passed the -L but that too didn't help.
I have also tried passing the cert and key using --cacert and --key but no luck.
Then I accessed the git using firefox, turned-on the developer tools and copied the "CURL URL" from the network tab which gave me something like below.
This worked! and I believe its the user_session key which got me in.
Please can someone help to find how I can generate this user_session using the curl? so that I can use it and curl again to authenticate and get the data.
I have generate a Personal Access Token from the GIT and passed to curl but that too didnt help. Below are my system details.
Code:
hostname:/home/user $ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
hostname:/home/user $ uname
Linux user 2.6.32-642.11.1.el6.x86_64 #1 SMP Wed Oct 26 10:25:23 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
hostname:/home/user $ curl -V
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
Kind Regards,
Kochappa.
Last edited by jim mcnamara; 04-02-2017 at 01:16 PM..
Reason: extra code tags
Hello all.
I have an incredible number of servers that I need to change a parameter on using a web interface. I'd like to be able to do this via curl, but I'm having some trouble. I filled out the form and hit update while snooping (tcpdump) my interface. That gave the the following as what is... (0 Replies)
Hi
I wish to "develop" for brew. It is hosted on GitHub. What book (or online documentation) do you recommend me for GitHub and/or Git?
Prefer small physical book. (1 Reply)
Hi Experts,
Problem statement :
We have an URL for which we need to read the data and get parsed inside the shell scripts.
My Aix has very limited perl utility, i cant install any utility as well.
Precisely, wget,cURL,Lynx,w3m and Lwp cant be used as i got these utilities only when i googled... (0 Replies)
Hi Experts,
Problem statement :
We have an URL for which we need to read the data and get parsed inside the shell scripts.My Aix has very limited perl utility, i cant install any utility as well.
Precisely, wget,cURL,Lynx,w3m and Lwp cant be used as i got these utilities only when i googled it.... (12 Replies)
Hi All,
I am trying to post an xml file (utf-16 encoded) using curl to a REST service. The REST service is expecting 'multipart/form-data' content type.
curl -k -i -H "Content-Type=multipart/form-data" -F "filename=@file.xml;type=text/xml" -X POST -u <username>:<password> <endPointURL>
... (0 Replies)
how to make the bash script ?
http://server.com/mysql.php
POST /mysql.php HTTP/1.1
Host: server.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language:... (1 Reply)
i'm using this command to post data to a remote host:
wget --post-data="My Data" http://<my-ip>:80 -O /dev/null -q
and
curl --data "My Data" http://<my-ip>:80
however, when i run the above, i see the following in my access log on the remote host:
Wget:
10.10.10.10 - - "POST /... (1 Reply)
HI All,
i want to asking about my case , how to post content file of data using curl.
currently if i wanna post data file , i can use this command below :
curl --cacert maxaj.cer -X POST -F 'fileupload=@/data/report_3300_xxx/log/traffic_3300_20180319_1051.txt'... (0 Replies)
Another opensource bastion goes to Microsoft.
Confirmed—Microsoft Buys GitHub For $7.5 Billion
It's official: Microsoft buys open-source coding community GitHub for a reported $7.5 billion | Alphr
Microsoft Is Buying GitHub. Here'''s Why. | Fortune
Why Microsoft is buying GitHub: It's all... (2 Replies)
Discussion started by: MadeInGermany
2 Replies
LEARN ABOUT DEBIAN
net::rendezvous::publish::backend::avahi
Net::Rendezvous::Publish::Backend::Avahi(3pm) User Contributed Perl Documentation Net::Rendezvous::Publish::Backend::Avahi(3pm)NAME
Net::Rendezvous::Publish::Backend::Avahi - Publish zeroconf data via Avahi
VERSION
version 0.04
COPYRIGHT AND LICENSE
Copyright (c) 2006 by Jack Bates. All rights reserved.
Copyright (c) 2012 by Ioan Rogers.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
SEE ALSO
Net::Rendezvous::Publish - The module this module supports.
Avahi <http://avahi.org/>
AUTHORS
o Ioan Rogers <ioanr@cpan.org>
o Jack Bates <jablko@cpan.org>
BUGS AND LIMITATIONS
You can make new bug reports, and view existing ones, through the web interface at
https://github.com/ioanrogers/Net-Rendezvous-Publish-Backend-Avahi/issues <https://github.com/ioanrogers/Net-Rendezvous-Publish-Backend-
Avahi/issues>.
SOURCE
The development version is on github at http://github.com/ioanrogers/Net-Rendezvous-Publish-Backend-Avahi
<http://github.com/ioanrogers/Net-Rendezvous-Publish-Backend-Avahi> and may be cloned from
git://github.com/ioanrogers/Net-Rendezvous-Publish-Backend-Avahi.git <git://github.com/ioanrogers/Net-Rendezvous-Publish-Backend-Avahi.git>
perl v5.14.2 2012-06-27 Net::Rendezvous::Publish::Backend::Avahi(3pm)