首页 > 解决方案 > pass pem file,certificate and user to authenticate

问题描述

I am trying to authenticate with chef api. To authenticate with chef api i need to pass in pem file, user and certificate. How can i pass that using requests module.

Below is what i am trying

r = requests.get('https://example.com', cert=(cert_file,ca_file), auth=('user') )

I went through these documents https://2.python-requests.org//en/latest/user/advanced/#ssl-cert-verification

I know pychef is available to interact with chef server , but i want to do it through requests module . Can this be achieved ?

标签: pythonpython-requestschef-infra

解决方案


try pychef by coderanger or you can get an inspiration from chef-api


推荐阅读