获得证书文件中的boto.cfg为Python [英] Getting Credentials File in the boto.cfg for Python

查看:369
本文介绍了获得证书文件中的boto.cfg为Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用AWS的第一次和刚刚安装博托的蟒蛇。我卡在台阶那里通知:到:

你可以把这个文件或者在/etc/boto.cfg全系统使用或在执行命令的〜/ .boto用户的主目录。

老实说,我不知道该怎么做。首先,我找不到boto.cfg和第二我不知道该命令的第二个选项来执行。

此外,当我将应用程序部署到我的服务器,我假设我需要做同样的事情有太多......

解决方案
  

你可以把这个文件或者在/etc/boto.cfg全系统使用   或在执行的命令为用户的主目录   〜/ .boto。

,前者只是意味着你可以创建一个名为 boto.cfg 在目录的/ etc (即配置文件这并不一定是已经存在,这取决于如何博托已安装在特定系统上)。

后者确实措辞有点可惜 - 〜/ .boto 意味着博托就会查找名为的配置文件 .boto 执行命令(如Python脚本),这是促进博托库的用户的主目录中。

您可以了解更多有关这方面的博托wiki文章 BotoConfig ,例如:对于眼下的问题:

  

一个博托配置文件只是一个格式为.ini配置文件   指定用于控制博托的行为选项的值   图书馆。在启动时,博托图书馆查找配置文件   在以下位置和顺序如下:

     
      
  1. /etc/boto.cfg - 站点范围的设置,这台机器上的所有用户   将使用
  2.   
  3. 〜/ .boto - 为特定用户设置
  4.   

你确实需要prepare您的应用程序部署到并在服务器上的相应配置文件。

祝你好运!

I'm using AWS for the first time and have just installed boto for python. I'm stuck at the step where it advices to:

"You can place this file either at /etc/boto.cfg for system-wide use or in the home directory of the user executing the commands as ~/.boto."

Honestly, I have no idea what to do. First, I can't find the boto.cfg and second I'm not sure which command to execute for the second option.

Also, when I deploy the application to my server, I'm assuming I need to do the same thing there too...

解决方案

"You can place this file either at /etc/boto.cfg for system-wide use or in the home directory of the user executing the commands as ~/.boto."

The former simply means that you might create a configuration file named boto.cfg within directory /etc (i.e. it won't necessarily be there already, depending on how boto has been installed on your particular system).

The latter is indeed phrased a bit unfortunate - ~/.boto means that boto will look for a configuration file named .boto within the home directory of the user executing the commands (i.e. Python scripts) which are facilitating the boto library.

You can read more about this in the boto wiki article BotoConfig, e.g. regarding the question at hand:

A boto config file is simply a .ini format configuration file that specifies values for options that control the behavior of the boto library. Upon startup, the boto library looks for configuration files in the following locations and in the following order:

  1. /etc/boto.cfg - for site-wide settings that all users on this machine will use
  2. ~/.boto - for user-specific settings

You'll indeed need to prepare a respective configuration file on the server your application is deployed to as well.

Good luck!

这篇关于获得证书文件中的boto.cfg为Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆