英文:
How to relocate the git-repo urls?
问题
I'm here to help with the translation. Here's the translated content:
我正在尝试为qca8081物理层构建驱动程序,并注意到它正在指向旧的CAF URL。这在我尝试执行repo sync
时导致了问题。
根据他们的驱动程序构建指南,以下是CLI,但它不起作用。
repo init -u git://codeaurora.org/quic/qsdk/releases/manifest/qstak -b release -m caf_AU_LINUX_QSDK_NHSS.QSDK.8.0.1_TARGET_ALL.7.0.1681.673.032.xml --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable
我可以将其更改为以下内容以通过该步骤:
repo init -u https://git.codelinaro.org/clo/qsdk/releases/manifest/qstak.git -b caf_migration/release -m caf_AU_LINUX_QSDK_NHSS.QSDK.8.0.1_TARGET_ALL.7.0.1681.673.032.xml
然而,以下第二步失败并显示错误。
$ repo sync -j1 --no-tags -c
fatal: unable to access 'https://source.codeaurora.org/quic/qsdk/oss/tools/meta/': Received HTTP code 502 from proxy after CONNECT
**编辑-1:**根据@phd的回复,我尝试通过以下两个命令更改git配置,以及编辑所有内部存储库中的config
文件。它们最终都要求我输入用户名/密码。
git config --global url.https://.insteadOf git://
git config --global url.https://git.codelinaro.org/clo/.insteadOf git://codeaurora.org/quic/
**附注:**如果这有关企业代理的话。
英文:
I'm trying to build driver for qca8081 phy and notice that it is pointing to old CAF URLs. That is causing problem when I tried to perform repo sync
per their driver build guide following is CLI, but it doesn't work.
repo init -u git://codeaurora.org/quic/qsdk/releases/manifest/qstak -b release -m caf_AU_LINUX_QSDK_NHSS.QSDK.8.0.1_TARGET_ALL.7.0.1681.673.032.xml --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable
I could change this to following to pass that step,
repo init -u https://git.codelinaro.org/clo/qsdk/releases/manifest/qstak.git -b caf_migration/release -m caf_AU_LINUX_QSDK_NHSS.QSDK.8.0.1_TARGET_ALL.7.0.1681.673.032.xml
However, the following 2nd step fails with error.
$ repo sync -j1 --no-tags -c
fatal: unable to access 'https://source.codeaurora.org/quic/qsdk/oss/tools/meta/': Received HTTP code 502 from proxy after CONNECT
EDIT-1: per reply from @phd, I tried changing the git config via following two commands, as well as editing config
file in all internal repositories. They both end-up asking me Username/password
git config --global url.https://.insteadOf git://
git config --global url.https://git.codelinaro.org/clo/.insteadOf git://codeaurora.org/quic/
Username for 'https://git.codelinaro.org':
P.S. I'm behind corporate proxy if that matters.
答案1
得分: 3
使用 git config --global url.<base>.insteadOf
在运行时替换URL:
git config --global url.https://git.codelinaro.org/clo/.insteadOf git://codeaurora.org/quic/
现在再尝试运行 repo sync
。
英文:
Use git config --global url.<base>.insteadOf
to substitute URLs on the fly:
git config --global url.https://git.codelinaro.org/clo/.insteadOf git://codeaurora.org/quic/
Now try repo sync
again.
答案2
得分: 2
repo
包装了git
,因此repo sync
将依赖于每个存储库中Git配置的远程信息。
对于每个受影响的存储库,
cd
到存储库目录- 运行
git remote -v
以列出当前远程信息;第一列是远程名称,第二列是URL - 运行
git remote set-url $REMOTE_NAME $NEW_URL
英文:
repo
wraps git
, so repo sync
will rely on whatever remotes are configured within Git for each repository.
For each affected repository,
cd
to the repository directorygit remote -v
to list current remotes; the first column is the remote name, and the second is the URLgit remote set-url $REMOTE_NAME $NEW_URL
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论