公共仓库直接克隆就可以,私人仓库需要权限验证,要先申请token
打开的页面最底下,有一个developer setting
这里申请到token之后,注意要保存起来,因为只显示一次。
假设叫 fatux/simple_theme, token_name和token改成自己申请的字符串
git clone https://token_name:token@github.com/fatux/simple_theme
执行这条命令后会在控制面板,用户账户,凭据管理器生成一条凭据,后面git push的时候就不需要输入token了。
这一条命令要执行以下
git config --global user.email "156277468@qq.com"
(base) PS D:\BaiduSyncdisk\odoo\odoo17\third_addons\simple_theme> git push
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 12 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 392 bytes | 392.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/fatux/simple_theme
edecf19..eb10212 main -> main
(base) PS D:\BaiduSyncdisk\odoo\odoo17\third_addons\simple_theme>