2019 11归档 的文章有 9 篇

windows上git clone认证失败后无法再次认证

git clone的时候,填错密码,再次git clone也不会提示输密码,表现如下

$ git clone https://wwww.git www
Cloning into 'www'...
remote: Coding 提示: Authentication failed.
remote: 认证失败,请确认您输入了正确的账号密码。
fatal: Authentication failed for 'https://wwww.git/

原因是 windows将密码信息保存在本地。需要这样处理
Control Panel\All Control Panel Items\Credential Manager
控制面板 > 用户账户 > 管理你的凭据 > Windows凭据
在Windows Credentials中找到git地址,编辑密码即可。

阅读全文 ~

shell check prameter / variable is exist

if [ -z ${var+x} ]; then 
    echo "var is unset"; 
else 
    echo "var is set to '$var'"; 
fi

var is the variable name,

To check for non-null/non-zero string variable, i.e. if set, use
if [ -n "$1" ]

if [ -n "$1" ]; then
    echo "You supplied the first parameter!"
else
    echo "First parameter not supplied."
fi

https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash

阅读全文 ~