curl

Create a User on Keycloack including password from curl command

青春壹個敷衍的年華 提交于 2021-01-21 07:29:12
问题 I have tried to create a user(without giving any password while creating) on keycloak using CURL command, it's success, but not able to know the password to login. So, how to give password to a user while creating. and also how to set default password for new users in keycloak I have used this link to create a user using curl: Create user on Keycloack from curl command 回答1: You need to set credentials for the user, so that you can login. something like this curl -v http://localhost:8080/auth

How to use ssh authentication with github API?

谁说胖子不能爱 提交于 2021-01-20 16:20:07
问题 Is there some way to use ssh-based authentication when accessing the GitHub API through the command line (via, e.g., curl, etc.?). FWIW, I tried many variations of the following (varying the way I specified my public ssh key file) but in every case I was still prompted for my password: % curl --pubkey ~/.ssh/id_rsa.pub --user yrstruly https://api.github.com/user/repos 回答1: If you are using ssh, then you would never logon as ' yrstruly '. You would always connect as 'git'. Your public key

Authorization Bearer token in HttpClient?

折月煮酒 提交于 2021-01-20 15:53:47
问题 I am trying to access an API using an oauth2 authorization token in Java Here is the client code DefaultHttpClient httpclient = new DefaultHttpClient(); HttpPost post = new HttpPost(http://res-api"); post.setHeader("Content-Type","application/json"); post.setHeader("Authorization", "Bearer " + finalToken); JSONObject json = new JSONObject(); // json.put ... // Send it as request body in the post request StringEntity params = new StringEntity(json.toString()); post.setEntity(params);

Authorization Bearer token in HttpClient?

限于喜欢 提交于 2021-01-20 15:52:11
问题 I am trying to access an API using an oauth2 authorization token in Java Here is the client code DefaultHttpClient httpclient = new DefaultHttpClient(); HttpPost post = new HttpPost(http://res-api"); post.setHeader("Content-Type","application/json"); post.setHeader("Authorization", "Bearer " + finalToken); JSONObject json = new JSONObject(); // json.put ... // Send it as request body in the post request StringEntity params = new StringEntity(json.toString()); post.setEntity(params);

Centos 7.4下安装kibana

久未见 提交于 2021-01-20 09:34:17
一. 以yum方式安装kibana 1 [root@LogServer yum .repos.d]# sudo yum install kibana 2 Loaded plugins: fastestmirror, langpacks 3 base | 3.6 kB 00 : 00 : 00 4 docker-ce-stable | 3.5 kB 00 : 00 : 00 5 elastic- 7 .x | 1.3 kB 00 : 00 : 00 6 extras | 3.4 kB 00 : 00 : 00 7 rsyslog_v8 | 2.5 kB 00 : 00 : 00 8 updates | 3.4 kB 00 : 00 : 00 9 Loading mirror speeds from cached hostfile 10 * base: ap.stykers.moe 11 * extras: centos.ustc.edu.cn 12 * updates: ap.stykers.moe 13 Resolving Dependencies 14 --> Running transaction check 15 ---> Package kibana.x86_64 0 : 7.4 . 0 - 1 will be installed 16 --> Finished

Zabbix4.0国内下载源

谁说我不能喝 提交于 2021-01-20 02:16:53
国内zabbix源总结 目前发现的有以下几个站点: 1.阿里巴巴开源镜像站(推荐使用) 地址:https://mirrors.aliyun.com/zabbix/ 2.华为开源镜像站(推荐使用) 地址:https://mirrors.huaweicloud.com/zabbix/ 3.清华大学开源软件镜像站 地址:https://mirror.tuna.tsinghua.edu.cn/zabbix/ 4.上海大学开源镜像站 地址:https://mirrors.shu.edu.cn/zabbix/ RHEL7/CentOS7 cat <<EOF > /etc/yum.repos.d/zabbix.repo [zabbix] name=Zabbix Official Repository - \$basearch baseurl=https://mirrors.aliyun.com/zabbix/zabbix/4.0/rhel/7/\$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591 [zabbix-non-supported] name=Zabbix Official Repository non-supported - \$basearch

「Jenkins」- 使用 Nginx 反向代理 Jenkins 服务 @20210118

佐手、 提交于 2021-01-18 17:00:50
配置文件 详细的内容参考官方的「 Running Jenkins behind Nginx 」文档 下面是配置文件(直接复制,我们也没有深入研究): upstream jenkins { keepalive 32; # keepalive connections server 127.0.0.1:8080; # jenkins ip and port } server { listen 80; # Listen on port 80 for IPv4 requests server_name jenkins.example.com; #this is the jenkins web root directory (mentioned in the /etc/default/jenkins file) root /var/run/jenkins/war/; access_log /var/log/nginx/jenkins/access.log; error_log /var/log/nginx/jenkins/error.log; ignore_invalid_headers off; #pass through headers from Jenkins which are considered invalid by Nginx server. location ~ "^

Linux 查看IP

我怕爱的太早我们不能终老 提交于 2021-01-15 07:40:30
UBuntu 系统下 按Ctrl+Alt+T 唤出终端 在终端输入: ifconfig 命令 点击回车 就可以看到自己电脑在局域网的IP地址了 图中第二行 inet 地址:192.168.1.101 就是你的电脑在局域网的IP地址了 如果输入 ifconfig 提示 找不到命令 那就在终端输入:sudo apt-get install net-tools 安装网络工具 安装完成后输入: sudo apt-get update 更新软件包 完成之后 再次输入 ifconfig 命令 就不会出现错误了 用Linux命令行获取本机外网IP地址    $ curl ifconfig.me [root@localhost ~]# curl ifconfig.me 14.23.92.186 $ curl icanhazip.com [root@localhost ~]# curl icanhazip.com 14.23.92.186 $ curl ident.me [root@localhost ~]# curl ident.me 14.23.92.186 $ curl ipecho.net/plain [root@localhost ~]# curl ipecho.net/plain 14.23.92.186 $ curl whatismyip.akamai.com [root

Ubuntu 16.04 LTS中安装Docker最新版本

我的梦境 提交于 2021-01-15 06:59:10
一、安装Docker的先决条件 1、运行64位CPU构架的计算机(目前只能是x86_64和amd64),请注意,Docker目前不支持32位CPU。 2、运行Linux 3.8或更高版本内核。一些老版本的2.6.x或其后的内核也能够运行Docker,但运行结果会有很大的不同。而且,如果你需要就老版本内核寻求帮助时,通常大家会建议你升级到更高版本的内核。 3、内核必须支持一种适合的存储驱动(storage driver),例如: Device Manage; AUFS; vfs; btrfs; ZFS 默认存储驱动通常是Device Mapper或AUFS 4、内核必须支持并开启cgroup和命名空间(namespace)功能。 检查Ubuntu内核版本   ~$ uname -a 检查内核存储驱动 安装linux-iamge-extra-*的kernel包。这个包允许你使用aufs存储驱动。 ~$ sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual 或 检查Device Mapper(推荐) ~$ ls -l /sys/class/misc/device-mapper     lrwxrwxrwx 1 root root 0 3月 24 15:19 /sys/class/misc