中的.bashrc猛砸歷史範圍
function gitpullsite(){
echo "Enter GIT username";
read gituname;
echo "Enter GIT password";
read -s gitpword;
giturl=https://$gituname:[email protected]/whateveruser/whateverrepo.git
repopath=/home/whateveruser/html/whateverrepo/;
sudo rm -r $repopath;
sudo git clone $giturl $repopath;
}
定義,然後在終端gitpullsite
我想刪除從歷史gituname
和gitpword
運行,但在歷史上,我不能找到這樣的條目的任何地方。我沒有適當的流程去除這些條目,因此這個歷史存儲在哪裏?它是否在功能範圍內而不是shell被忽略?
我不想要的是一個未知的用戶名和密碼蹤跡,存儲在我不知道的地方 - 一個明顯的安全問題應該是系統受到危害。
目標是添加更多不同的'嵌套'回購,但用戶只需輸入憑證一次。
我不知道我理解你的問題,但在bash歷史通常會被保存在'〜/ .bash_history'。它只會保存命令,而不是響應'read'的輸入。 – 0range
是的,這是我試圖確認,一個函數內的命令不存儲,只是對該函數的調用 - 不幸的是我不允許標記'.bash_history' – Datadimension
不僅不會保存密碼,它實際上只會保存直接發出的命令,即'gitpullsite'。 – 0range