1

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.

user19410404
  • 106
  • 7

2 Answers2

3

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.

phd
  • 82,685
  • 13
  • 120
  • 165
  • thanks phd. that also doesn't work. I also tried replacing git with https `git config --global url.https://.insteadOf git://` but that also ended-up with same error – user19410404 Apr 19 '23 at 19:36
  • @user19410404 source.codeaurora.org should be fixed separately: `git config --global url.https://git.codelinaro.org/clo/.insteadOf https://source.codeaurora.org/quic/` The same for any additional URLs. – phd Apr 19 '23 at 20:25
  • this is exactly what I tried. Now I've two entries in my `~/.gitconfig`. 1. for codelinaro and 2. https. I **also** tried editing config file of each repo inside `.repo` directory and both ways it ends up with same error: `Username for 'https://git.codelinaro.org':` – user19410404 Apr 19 '23 at 20:34
  • `git clone https://git.codelinaro.org/clo/qsdk/releases/manifest/qstak.git -b caf_migration/release` works for me, doesn't ask for password. Could the request for username/password come from your corporate proxy? BTW the commands to rewrite URLs should be `git config --global url.https://git.codelinaro.org/clo/.insteadOf git://codeaurora.org/quic/ && git config --global --add url.https://git.codelinaro.org/clo/.insteadOf https://source.codeaurora.org/quic/` (note `--add`). – phd Apr 20 '23 at 09:34
  • I could pass the 1st step `repo init` by changing the url to `git.codelinaro...` The problem is with 2nd step `repo sync` where it requires username/password for `git.codelinaro.org` so it doesn't look asking for proxy username/password. – user19410404 Apr 20 '23 at 12:48
  • I installed `repo` (I never used it) and ran `repo init && repo sync`. It asked me "Username:" and then reported a lot of errors most of which is "*fatal: couldn't find remote ref refs/heads/NHSS.QSDK.8.0.1*". It seems not all tags were moved to the new repository. Try a different tag. – phd Apr 20 '23 at 13:15
  • thanks @phd for trying that. It looks there are some repository which requires pre-registration. for that it is asking for username/password. unfortunately i don't have that so kind of stuck here. – user19410404 Apr 21 '23 at 14:27
2

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
Jim Redmond
  • 4,139
  • 1
  • 14
  • 18
  • oh, there are many. i'll try and change for each of them to see how it go. I was wondering there is some easy way like subversion where we can relocate the repostiry. – user19410404 Apr 19 '23 at 18:24
  • I modified all repos manually but now running `repo sync` is asking for `Username for 'https://git.codelinaro.org':` and the codelinaro account seems is only available to prior authorized users ONLY. I'm stuck wondering how to proceed. – user19410404 Apr 19 '23 at 18:58