github通过token提交代码


github通过token提交代码

生成token

个人头像->Setttings->Developer settings->Personal access tokens->Generate new token
登录github后点这里进入 设置token

本地设置

清空本地密码

git config --local credential.helper ""

设置token

修改服务的配置,配置文件在 .git/config

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = true
[remote "origin"]
        url = https://{用户名}:{生成的token}@github.com/username/java.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
        remote = origin
        merge = refs/heads/main

说明:修改url,{用户名}设置为自己提交的用户名,{生成的token}替换成token

\(1.01^{365} ≈ 37.7834343329\)
\(0.99^{365} ≈ 0.02551796445\)
相信坚持的力量!


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM