Two, python authentication

HTTPBasicAuth authentication

After authentication is that some action must be logged in have permission to operate, in order to build the project after such jenkins must be logged in with the authentication mode jenkins is basic_auth, specific use as follows:

  1. 导入 from requests.auth import HTTPBasicAuth
  2. requests.post (url, data = {}, auth = ( 'username', 'password'))

Guess you like

Origin www.cnblogs.com/yiwenrong/p/12658491.html