Kathy.Pu
Kathy.Pu

Reputation: 97

repo init failed for reason "'origin' does not appear to be a git repository"

I try to get a repo with following steps, but failed. I have the access right of "https://xxxx/xxxx/manifest.git". What's wrong?

command: mkdir t

cd t

repo --trace init -u https://xxxx/xxxx/repo_manifest.git

Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo

... A new repo command ( 1.26) is available.
... You should upgrade soon:

    cp /home/xxxx/t/.repo/repo/repo /usr/bin/repo

: parsing /home/xxxx/.gitconfig
Get https://xxxx/xxxx/repo_manifest.git
: export GIT_DIR=/home/xxxx/t/.repo/manifests.git
: git init 1>| 2>|
: git config --file /home/xxxx/t/.repo/manifests.git/config --null --list 1>| 2>|
: git config --file /home/xxxx/t/.repo/manifests.git/config --replace-all filter.lfs.smudge git-lfs smudge --skip -- %f 1>| 2>|
: git config --file /home/xxxx/t/.repo/manifests.git/config --replace-all filter.lfs.process git-lfs filter-process --skip 1>| 2>|
: git config --file /home/xxxx/t/.repo/manifests.git/config --replace-all remote.origin.url https://xxxx/xxxx/repo_manifest.git 1>| 2>|
: git config --file /home/xxxx/t/.repo/manifests.git/config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/* 1>| 2>|
curl --fail --output /home/xxxx/t/.repo/manifests.git/clone.bundle.tmp --netrc --location https://xxxx/xxxx/repo_manifest.git/clone.bundle
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 401 Unauthorized
Server does not provide clone.bundle; ignoring.
: git fetch --progress origin --tags +refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* +refs/heads/master:refs/remotes/origin/master 1>| 2>|
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
: git fetch --progress origin --tags +refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* +refs/heads/master:refs/remotes/origin/master 1>| 2>|
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
: git pack-refs --all --prune 1>| 2>|
fatal: cannot obtain manifest https://xxxx/xxxx/repo_manifest.git

Upvotes: 1

Views: 744

Answers (1)

Kathy.Pu
Kathy.Pu

Reputation: 97

Remove ~/.gitconfig, and config the account following the tips showed by "repo init". It works.

Upvotes: 1

Related Questions