Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve git error: Server does not allow request for unadvertised object 3a2ceef391af73994dfeb0d8ef57ed6a52ef4238?

Tags:

git

bitbucket

I wanted to pull commit "3a2ceef391af73994dfeb0d8ef57ed6a52ef4238" from branch android. I used the command:

$ git fetch origin 3a2ceef391af73994dfeb0d8ef57ed6a52ef4238

and it is showing this error,

error: Server does not allow request for unadvertised object 3a2ceef391af73994dfeb0d8ef57ed6a52ef4238

How to solve this problem?

like image 236
Tazwar Utshas Avatar asked Jun 23 '18 14:06

Tazwar Utshas


People also ask

Does not allow request for unadvertised object?

The error message "Server does not allow request for unadvertised object" is reported when a commit updating a submodule pointer points to a commit that does not exist in the repository for that submodule, even if later commits in the branch points to a commit that do exist in the submodule repo.

What is git submodule sync?

git submodule sync synchronizes all submodules while git submodule sync -- A synchronizes submodule "A" only. If --recursive is specified, this command will recurse into the registered submodules, and sync any nested submodules within.

What is git submodule update?

A git submodule update will bring the latest commits into your local Git worktree. In this git submodule update example, we'll show you how branches can seem out of sync between your submodule and the latest commit, and how to issue the appropriate git command to update those git submodules with the latest code.


2 Answers

git submodule sync as pointed in https://github.com/AppImage/AppImageKit/issues/511 works for me.

like image 134
Sravya Avatar answered Sep 28 '22 07:09

Sravya


According to this answer and the given source it looks like BitBucket does not allow you to fetch a commit id, only references.

I cannot say if you can configure this behavior, but I think you can:

  1. Pull the branch: git pull origin branchname
  2. Checkout the local commit id: git checkout <commitid>
like image 38
Arount Avatar answered Sep 28 '22 09:09

Arount