美文网首页
使用MobaXterm 加载GIT,并下载项目

使用MobaXterm 加载GIT,并下载项目

作者: 安卓_背包客 | 来源:发表于2022-08-20 19:26 被阅读0次

    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 官方指导

    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."

    相关文章

      网友评论

          本文标题:使用MobaXterm 加载GIT,并下载项目

          本文链接:https://www.haomeiwen.com/subject/xermgrtx.html