How to relocate the git-repo urls?

716 Views Asked by At

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.

2

There are 2 best solutions below

7
phd On BEST ANSWER

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
Jim Redmond On

repo wraps git, so repo sync will rely on whatever remotes are configured within Git for each repository.

For each affected repository,

  1. cd to the repository directory
  2. git remote -v to list current remotes; the first column is the remote name, and the second is the URL
  3. git remote set-url $REMOTE_NAME $NEW_URL