使用MobaXterm 加載GIT,并下載項(xiàng)目

MobaXterm 下載地址:

https://mobaxterm.mobatek.net/download.html
本人使用的版本:https://wwn.lanzouv.com/iVewO09wiqfg

MobaXterm 下載Git步棸

打開MobaXterm ,找到Packages,

image.png

右鍵粘貼

image.png

界面如下:找到Git 安裝,并安裝直到提示成功

image.png

修改MobaXterm 主目錄保持路徑(即工程目錄)

注意:如果你沒有修改齿拂,默認(rèn)路徑如下:
C:\Users\xxx\AppData\Local\Temp\Mxt203\tmp\home_Dell\

找到MobaXterm Table 中Settings,選擇Configuration

image.png

修改目錄如下古劲,點(diǎn)擊OK

image.png

開始使用MobaXterm

點(diǎn)擊主界面 Start local terminal

image.png

執(zhí)行l(wèi)s,就可以查看基礎(chǔ)生產(chǎn)文件

image.png

下面就可以執(zhí)行g(shù)it clone

image.png

注意:username,password,這里github 在2020以后就無法使用賬號(hào)密碼登錄璃哟,

這里請(qǐng)輸入用戶賬號(hào)氛琢,密碼要使用Token 登錄,然后就是正常使用命令

image.png

申請(qǐng)Token 官方指導(dǎo)

  1. Verify your email address, if it hasn't been verified yet.

  2. In the upper-right corner of any page, click your profile photo, then click Settings.

image.png
  1. In the left sidebar, click Developer settings.

  2. In the left sidebar, click Personal access tokens.

image.png
  1. Click Generate new token.
image.png
  1. Give your token a descriptive name.
image.png
  1. To give your token an expiration, select the Expiration drop-down menu, then click a default or use the calendar picker.
image.png
  1. Select the scopes, or permissions, you'd like to grant this token. To use your token to access repositories from the command line, select repo.
image.png
  1. Click Generate token.

image.png

image.png

10 . To use your token to authenticate to an organization that uses SAML single sign-on, authorize the token. For more information, see "Authorizing a personal access token for use with SAML single sign-on" in the GitHub Enterprise Cloud documentation.

Using a token on the command line

Once you have a token, you can enter it instead of your password when performing Git operations over HTTPS.

For example, on the command line you would enter the following:

$ git clone https://github.com/username/repo.git
Username: your_username
Password: your_token

Personal access tokens can only be used for HTTPS Git operations. If your repository uses an SSH remote URL, you will need to switch the remote from SSH to HTTPS.

If you are not prompted for your username and password, your credentials may be cached on your computer. You can update your credentials in the Keychain to replace your old password with the token.

Instead of manually entering your PAT for every HTTPS Git operation, you can cache your PAT with a Git client. Git will temporarily store your credentials in memory until an expiry interval has passed. You can also store the token in a plain text file that Git can read before every request. For more information, see "Caching your GitHub credentials in Git."

配置SSH key:

  1. git config --global user.name "xxxx"
    ?

  2. git config --global user.email "xxx@qq.com"

  3. ssh-keygen -t rsa -C "xx@qq.com"
    4 . cd ~/.ssh

  4. cat id_rsa.pub


    image.png
image.png

多賬號(hào)配置

git config --global user.name "UserXXX"
git config --global user.email "UserXXX@qq.com"

ssh-keygen -t rsa -C "xxx@qq.com"

這里輸入生產(chǎn)后文件

Generating public/private rsa key pair.
Enter file in which to save the key (/home/mobaxterm/.ssh/id_rsa): /home/mobaxterm/.ssh/id_rsaUserXXX
image.png
Host UserXXX
     HostName github.com
     PreferredAuthentications publickey
     IdentityFile ~/.ssh/id_rsaUserXXX

Host UserXXX
     HostName github.com
     PreferredAuthentications publickey
     IdentityFile ~/.ssh/id_rsaUserXXX

查看ssh
cat id_rsaUserXXX.pub

image.png

ssh -T git@UserXXX

image.png
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末随闪,一起剝皮案震驚了整個(gè)濱河市阳似,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌蕴掏,老刑警劉巖障般,帶你破解...
    沈念sama閱讀 217,509評(píng)論 6 504
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異盛杰,居然都是意外死亡挽荡,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,806評(píng)論 3 394
  • 文/潘曉璐 我一進(jìn)店門即供,熙熙樓的掌柜王于貴愁眉苦臉地迎上來定拟,“玉大人,你說我怎么就攤上這事∏嘧裕” “怎么了株依?”我有些...
    開封第一講書人閱讀 163,875評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵,是天一觀的道長延窜。 經(jīng)常有香客問我恋腕,道長,這世上最難降的妖魔是什么逆瑞? 我笑而不...
    開封第一講書人閱讀 58,441評(píng)論 1 293
  • 正文 為了忘掉前任荠藤,我火速辦了婚禮,結(jié)果婚禮上获高,老公的妹妹穿的比我還像新娘哈肖。我一直安慰自己,他們只是感情好念秧,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,488評(píng)論 6 392
  • 文/花漫 我一把揭開白布淤井。 她就那樣靜靜地躺著,像睡著了一般摊趾。 火紅的嫁衣襯著肌膚如雪币狠。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,365評(píng)論 1 302
  • 那天严就,我揣著相機(jī)與錄音总寻,去河邊找鬼。 笑死梢为,一個(gè)胖子當(dāng)著我的面吹牛渐行,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播铸董,決...
    沈念sama閱讀 40,190評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼祟印,長吁一口氣:“原來是場噩夢(mèng)啊……” “哼!你這毒婦竟也來了粟害?” 一聲冷哼從身側(cè)響起蕴忆,我...
    開封第一講書人閱讀 39,062評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎悲幅,沒想到半個(gè)月后套鹅,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,500評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡汰具,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,706評(píng)論 3 335
  • 正文 我和宋清朗相戀三年卓鹿,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片留荔。...
    茶點(diǎn)故事閱讀 39,834評(píng)論 1 347
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡吟孙,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情杰妓,我是刑警寧澤藻治,帶...
    沈念sama閱讀 35,559評(píng)論 5 345
  • 正文 年R本政府宣布,位于F島的核電站巷挥,受9級(jí)特大地震影響桩卵,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜句各,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,167評(píng)論 3 328
  • 文/蒙蒙 一吸占、第九天 我趴在偏房一處隱蔽的房頂上張望晴叨。 院中可真熱鬧凿宾,春花似錦、人聲如沸兼蕊。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,779評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽孙技。三九已至产禾,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間牵啦,已是汗流浹背亚情。 一陣腳步聲響...
    開封第一講書人閱讀 32,912評(píng)論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留哈雏,地道東北人楞件。 一個(gè)月前我還...
    沈念sama閱讀 47,958評(píng)論 2 370
  • 正文 我出身青樓,卻偏偏與公主長得像裳瘪,于是被迫代替她去往敵國和親土浸。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,779評(píng)論 2 354

推薦閱讀更多精彩內(nèi)容