This error occurs when you try to push commits to a GitLab repository that has been archived. Archived projects are read-only, so you must unarchive the project or push to a different repository.
When you push to a GitLab repository and receive "The project is archived and cannot be modified," it means the repository owner or administrator has placed the project into archived status. In GitLab, archiving a project makes it entirely read-only. When a project is archived: - The repository displays an "Archived" badge - All Git operations that modify the repository (push, merge) are blocked - Issues, merge requests, and wikis become read-only - Scheduled CI/CD pipelines stop running - Pull mirroring stops - Fork relationships are severed and open merge requests from forks close This is a deliberate action taken by project maintainers, typically to preserve historical projects that are no longer actively developed. The error is GitLab enforcing this read-only state. Common scenarios where you encounter this error: - Pushing to an old project that was archived after you cloned it - Automated CI/CD pipelines targeting repositories that were archived - Contributing to an open source project that has been deprecated - Attempting to push to a project archived as part of a group archive
First, confirm the project's archived status:
1. Go to the project in GitLab's web interface
2. Look for an Archived badge near the project name
3. Or navigate to Settings > General > Advanced and check the archive status
If you see the archived badge or status, the project is in read-only mode and no Git operations that modify the repository will work.
If you're a contributor but not a project owner:
1. Contact the project owner or administrator
2. Explain why you need to push changes
3. Ask them to unarchive the project temporarily or permanently
Only users with Owner or Administrator role can unarchive a project. If the project was intentionally deprecated, consider forking it instead.
If you're a project owner or administrator:
1. Go to Your Projects and select the Inactive tab (archived projects are listed here)
2. Find and open your project
3. Navigate to Settings > General
4. Expand the Advanced section
5. Click Unarchive project
Alternatively, from any project list view, click the actions menu (three dots) next to the project and select Unarchive.
After unarchiving:
- Read-only restrictions are lifted immediately
- Scheduled CI/CD pipelines resume automatically
- Pull mirroring resumes automatically
If the project was archived as part of a group archive, you cannot unarchive it individually:
1. Navigate to the parent group settings
2. Go to Settings > General > Advanced
3. Click Unarchive group
This will unarchive all projects and subgroups within that group. You must have Owner or Administrator access to the group.
If the project is intentionally archived and should remain so, fork it:
1. Go to the archived project in GitLab
2. Click the Fork button (forking still works on archived projects)
3. Select your namespace for the fork
4. Push your changes to your forked repository
# Update your remote to point to the fork
git remote set-url origin [email protected]:your-username/forked-project.git
# Or add it as a new remote
git remote add myfork [email protected]:your-username/forked-project.git
# Push to your fork
git push myfork mainThis lets you continue development without requiring changes to the original archived project.
If automated systems are failing due to archived projects:
1. Update pipeline configurations to target the correct (unarchived) repository
2. Or update the repository URL to point to a fork
3. Remove any triggers or schedules for archived projects
For GitLab CI/CD using multi-project pipelines:
# Update downstream project references
trigger:
project: new-namespace/unarchived-project # Updated path
branch: main### Why Projects Get Archived
Archiving is typically done for:
- Deprecated projects: Software that's no longer maintained
- Completed projects: One-time projects that are finished
- Organization cleanup: Reducing clutter in project lists
- Compliance: Preserving historical projects without allowing modifications
### Finding Archived Projects
Archived projects don't appear in standard project listings. To find them:
1. Go to Your Projects
2. Click the Inactive tab
3. Archived projects show a badge indicating their status
### Group Archiving Behavior
When a group is archived:
- All projects and subgroups within it are archived
- Projects cannot be unarchived individually
- You must unarchive the entire group first
- This is useful for archiving entire organizational units
### GitLab Pages and Archived Projects
When a project is archived:
- Deployed GitLab Pages are removed
- Custom domains are cleared
- After unarchiving, you must manually rerun the pipeline to restore Pages
### Self-Hosted GitLab Considerations
On self-hosted GitLab instances, administrators have additional options:
- Archive/unarchive via the Admin Area
- Bulk archive projects via Rails console
- Different permission models may apply
### API Access to Archived Projects
Read-only API access still works on archived projects. You can:
- Clone the repository
- Read issues and merge requests
- Access CI/CD logs and artifacts
- Download files and releases
kex_exchange_identification: Connection closed by remote host
Connection closed by remote host when connecting to Git server
fatal: unable to access: Proxy auto-configuration failed
How to fix 'Proxy auto-configuration failed' in Git
fatal: unable to access: Authentication failed (proxy requires basic auth)
How to fix 'Authentication failed (proxy requires basic auth)' in Git
fatal: unable to access: no_proxy configuration not working
How to fix 'no_proxy configuration not working' in Git
fatal: unable to read tree object in treeless clone
How to fix 'unable to read tree object in treeless clone' in Git