Git免密码提交

http://www.akmumu.com/2015/06/02/360.html

Git 提交

1
2
3
4
5
1git init
2git add .
3git commit -m “说明”
4git remote add origin https://github.com/superbobogithub/xxxx.git
5git push -u origin master

 

下面说一下https克隆的方式免密码提交

  • 使用https的方式克隆代码

    git clone https://github.com/akmumu/google_hosts.git

  • 查看项目中的配置文件

    vim .git/config

    [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true [remote “origin”] url = https://github.com/akmumu/google_hosts.git fetch = +refs/heads/:refs/remotes/origin/ [branch “master”] remote = origin merge = refs/heads/master

  • 修改remote中的url那行如下

    url = https://akmumu:123456@github.com/akmumu/google_hosts.git

https://username:password@github.com/username/project.git username就是你账号的个性地址


posted @   索马里猫  阅读(585)  评论(0编辑  收藏  举报
编辑推荐:
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· .NET Core内存结构体系(Windows环境)底层原理浅谈
· C# 深度学习:对抗生成网络(GAN)训练头像生成模型
· .NET 适配 HarmonyOS 进展
阅读排行:
· 用 DeepSeek 给对象做个网站,她一定感动坏了
· DeepSeek+PageAssist实现本地大模型联网
· 手把手教你更优雅的享受 DeepSeek
· 腾讯元宝接入 DeepSeek R1 模型,支持深度思考 + 联网搜索,好用不卡机!
· 从 14 秒到 1 秒:MySQL DDL 性能优化实战
点击右上角即可分享
微信分享提示