gpt4 book ai didi

Git Push - 远程 url 中的用户名和密码

转载 作者:太空狗 更新时间:2023-10-29 12:54:21 25 4
gpt4 key购买 nike

据我所知,推送到 github 时的密码提示可以通过在 remote push url 中添加用户名:密码来避免。 .

https://you:password@github.com/you/example.git

这是 github 特定的安排还是这种格式可以用于任何 git 远程(https://username:password@somedomain.org/repo.git)?

最佳答案

如果您使用 HTTPS,通过 GitHub 对您进行身份验证比将您的密码放在远程 URL 中更安全的方法是在 this 中生成一个新 token 。 GitHub 页面,然后像这样构建您的远程 URL:

https://<username>:<token>@github.com/<username>/<project_name>.git

关于Git Push - 远程 url 中的用户名和密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26544969/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com