Mr.*_*r.D 5 python windows cmd fabric
我有一个远程Ubuntu服务器VPS,我连接并通过结构执行命令.
我使用Windows PC连接到这个远程VPS,使用以下命令:
@task
def git_pull():
"""
"""
run("cd ~/{}/; git pull".format(env.repo_name))
Run Code Online (Sandbox Code Playgroud)
当我运行此命令时,它会让我写下我的Git的登录名和密码.
当我尝试输入它们时,它会像这样写:
(virtualenv) D:\path\to\project\fabfile>fab common.git_pull
[1.2.3.4] Executing task 'common.git_pull'
[1.2.3.4] run: cd ~/project/; git pull
[1.2.3.4] out: Username for 'https://git.example.com': u^@s^@e^@r^@
Run Code Online (Sandbox Code Playgroud)
正如您在我尝试编写时所看到的那样,将user其写为u^@s^@e^@r^@
它附加了这个奇怪的插入^@符号
为什么windows fabric附加了这些奇怪的^@符号?
是因为paramiko织物正在使用它?
我认为这种情况发生的原因是编码不同而且我使用了chcp命令,它仍然附加了这些额外的符号.
| 归档时间: |
|
| 查看次数: |
174 次 |
| 最近记录: |