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.
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 FREEBSD
xo_set_allocator
LIBXO(3) BSD Library Functions Manual LIBXO(3)NAME
xo_emit -- emit formatted output based on format string and arguments
LIBRARY
library ``libxo''
SYNOPSIS
#include <libxo/xo.h>
typedef void *(*xo_realloc_func_t)(void *, size_t);
typedef void (*xo_free_func_t)(void *);
void
xo_set_allocator(xo_realloc_func_t realloc_func, xo_free_func_t free_func);
DESCRIPTION
The xo_set_allocator() function allows libxo to be used in environments where the standard realloc(3) and free(3) functions are not avail-
able.
realloc_func should expect the same arguments as realloc(3) and return a pointer to memory following the same convention. free_func will
receive the same argument as free(3) and should release it, as appropriate for the environment.
By default, the standard realloc(3) and free(3) functions are used.
ADDITIONAL DOCUMENTATION
Complete documentation can be found on github:
http://juniper.github.io/libxo/libxo-manual.html
libxo lives on github as:
https://github.com/Juniper/libxo
The latest release of libxo is available at:
https://github.com/Juniper/libxo/releases
SEE ALSO xo_emit(3)HISTORY
The libxo library was added in FreeBSD 11.0.
AUTHOR
Phil Shafer
BSD December 4, 2014 BSD