gpt4 book ai didi

git - 如何在同一台 Ubuntu 机器上使用 2 个不同的 GIT 远程服务器?

转载 作者:行者123 更新时间:2023-12-04 19:00:22 25 4
gpt4 key购买 nike

关闭。这个问题需要details or clarity .它目前不接受答案。












想改进这个问题?通过 editing this post 添加详细信息并澄清问题.


2年前关闭。







Improve this question




我在笔记本电脑上使用我的公司存储帐户。有时我开发我的个人项目,我想在这些项目中使用我的个人 Github 帐户。我知道如何通过 here 中的 ssh key 使用 2 个不同的 git 远程服务器

但我不想玩 ssh 键。我是否可以通过我的个人 github 帐户将 GIT 与 HTTPS 一起使用?

最佳答案

Is it possible I use GIT with HTTPS with my personal github account ?



是的:只需将远程 URL 从 SSH 更改为 https:
cd /path/mto/my/repo
git remote set-url origin https://github.com/<me>/myproject

将其与 credential helper 结合使用缓存凭据。
我会推荐 GCM(Git 凭据管理器),例如 Mac/Linux。 .
这样,您就不必每次推送到远程存储库时都输入您的 GitHub 帐户密码。

关于git - 如何在同一台 Ubuntu 机器上使用 2 个不同的 GIT 远程服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53947635/

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