作者:linjiabin43 | 来源:互联网 | 2023-09-05 13:30
在HTTP请求头中携带BasicAuth认证的用户名和密码sftUserConfig.getUserName为Authorization账号sftUserConfig.getP
在HTTP请求头中携带Basic Auth认证的用户名和密码
sftUserConfig.getUserName为Authorization 账号
sftUserConfig.getPassword为Authorization密码
HttpHeaders headers = new HttpHeaders();headers.set("authorization","Basic " +Base64.getEncoder().encodeToString("admin:admin".getBytes()));
发起git请求
HttpHeaders headers = new HttpHeaders();headers.set("authorization","Basic " +Base64.getEncoder().encodeToString("admin:admin".getBytes()));HttpEntity