Coding⏱️ 3 min read📅 2026-06-11

How to Fix: What does the git error message "Server does not allow request for unadvertised object" mean?

Git error message explanation and solution.

Quick Answer: The error occurs when Git tries to clone a repository with unadvertised objects. To fix, use the --allow-unrelated-histories option or remove the submodule references.

The error message "Server does not allow request for unadvertised object" is typically encountered when trying to clone or update a Git repository that contains submodules. This error occurs because the server being accessed (in this case, GitHub) does not support requests for objects that have not been advertised by the repository.

This error can be frustrating for users who are familiar with Git and have successfully cloned repositories in the past. However, it is a common issue that can be resolved by taking a few simple steps.

🛑 Root Causes of the Error

  • The primary cause of this error is that some submodules may not be advertised by the repository. This can happen if the submodule's URL is incorrect or if the submodule has not been properly configured in the Git repository.
  • Another possible cause is that the server being accessed (in this case, GitHub) does not support requests for unadvertised objects. This can be due to various reasons such as security settings or limitations on the number of submodules allowed.

🚀 How to Resolve This Issue

Resolving the error by using the --fetch-submodule option

  1. Step 1: To resolve this issue, you can try cloning the repository with the --fetch-submodule option. This will allow Git to fetch the submodule's objects from the server.
  2. Step 2: Use the following command: `git clone --recursive --fetch-submodule https://github.com/simsong/tcpflow.git`
  3. Step 3: This option may take longer than usual because it requires fetching the submodule's objects from the server.

Resolving the error by using a different Git version or repository

  1. Step 1: If you are using an older version of Git that does not support submodules, you may need to upgrade to a newer version.
  2. Step 2: Alternatively, you can try cloning the repository from a different Git server or repository that supports submodules.

💡 Conclusion

To summarize, the error message "Server does not allow request for unadvertised object" is typically encountered when trying to clone or update a Git repository with submodules. By using the --fetch-submodule option or upgrading to a newer version of Git, you can resolve this issue and successfully clone the repository.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions