MobaXterm 下载地址:
https://mobaxterm.mobatek.net/download.html
本人使用的版本:https://wwn.lanzouv.com/iVewO09wiqfg
MobaXterm 下载Git步棸
打开MobaXterm ,找到Packages,
image.png
界面如下:找到Git 安装,并安装直到提示成功
image.png
修改MobaXterm 主目录保持路径(即工程目录)
注意:如果你没有修改,默认路径如下:
C:\Users\xxx\AppData\Local\Temp\Mxt203\tmp\home_Dell\
找到MobaXterm Table 中Settings,选择Configuration
image.png
修改目录如下,点击OK
image.png
开始使用MobaXterm
点击主界面 Start local terminal
image.png
执行ls,就可以查看基础生产文件
image.png
下面就可以执行git clone
image.png
注意:username,password,这里github 在2020以后就无法使用账号密码登录,
这里请输入用户账号,密码要使用Token 登录,然后就是正常使用命令
image.png
申请Token 官方指导
-
Verify your email address, if it hasn't been verified yet.
-
In the upper-right corner of any page, click your profile photo, then click Settings.
image.png
-
In the left sidebar, click Developer settings.
-
In the left sidebar, click Personal access tokens.
image.png
- Click Generate new token.
image.png
- Give your token a descriptive name.
image.png
- To give your token an expiration, select the Expiration drop-down menu, then click a default or use the calendar picker.
image.png
- 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
- 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."
网友评论