git遠端連線主機

2021-10-12 19:24:44 字數 735 閱讀 5086

1.環境變數

path:c:\program files\git\bin(安裝目錄的bin目錄)

2.啟動git-bash

(1)windows目錄:c:\program files\git,執行git-bash.exe即可。

(2)建立redis-getcode.bat檔案,寫入內容,然後執行。

內容:cd c:\program files\git

git-bash

3.git-bash遠端連線主機

(1)以root使用者連線主機:ssh -p 22 [email protected]

(2)輸入密碼

(3)切換redis目錄:cd /root/redis/redis-5.0.8/src/

(4)連線redis:./redis-cli -h 9.1.14.209 -p 6379

(5)查詢資料:get finger:bank:verify_img_token:5227b05486584f869160865236c49e8a

(6)退出redis:exit

(7)從redis的預設0庫查詢資料,並寫入檔案:./redis-cli -n 0 get finger:bank:verify_img_token:5227b05486584f869160865236c49e8a >/root/redis/redis-5.0.8/src/1.txt

(9)移除檔案:rm -rf /root/redis/redis-5.0.8/src/1.txt

git連線遠端

1.git是乙個版本控制系統,可以在本地使用,當我們需要和他人協助時,往往需要乙個遠端倉庫放置檔案。例如github和gitlab等。1.多人協作時,總是放在乙個遠端伺服器上,使用git clone即可轉殖遠端倉庫的 到本地。2.git clone支援兩種協議 https協議和ssh協議。3.git...

通過SSH連線遠端主機

要通過終端連線乙個遠端主機,正常的配置是直接在命令列中 ssh user 192.168.1.1 然後輸入秘密就好了.如果想通過ssh的方式進行免密碼登入,就要進行一定的配置.這裡的環境是mac linux之間的連線,首先通過命令列生成ssh密匙.一般在home目錄下的.ssh資料夾 隱藏 生成密匙...

git如何新增遠端主機 Git遠端操作詳解

一 git clone git clone 二 git remote 1.git remote命令列出所有遠端主機 git remote origin 2.使用 v選項,可以參看遠端主機的 git remote v origin git github.com jquery jquery.git fe...