404 on Project Import
On this page
Mattrbld offers you the ability to send out invite links to your collaborators so they can quickly start working on a project with you. You can learn more about this in the dedicated article on the subject. However, in some cases, using such a link or trying to import the project with a repository URL during onboarding or from the home screen can result in an unexpected 404 error showing up.
In this article, you’ll learn why this can happen and what to do about it.
Reasons for 404 Errors on Import
There are two main reason an import can fail with a 404 error, and while one is pretty obvious, the other is more frequent and can turn into somewhat of a head scratcher if you’re not aware of why it’s happening.
Reason One: It’s a Genuine 404
The more obvious reason is that Mattrbld cannot find the repository, because either the invite link is outdated or incorrect, or the repository was moved to a different Git provider, or renamed on the same one.
This can be fixed by re-importing the project from the correct location and then copying and sending out the invite links again, so they now contain the correct repository URL as well.
Reason Two: It’s an Access Control Issue
Sometimes, however, the repository URL in the invite link is absolutely correct but Mattrbld still reports a 404 error when trying to import the repository with that invite link. This has to do with the way Mattrbld does authentication and permissions.
When the repository that’s being imported is not public, Mattrbld asks the user to authenticate when attempting the import, or the initial clone in Git-jargon, of the project. If the authentication succeeds, but the user has no access to the Git repository they’re trying to import, it looks to Mattrbld as if the repository doesn’t exist and that’s why it reports a 404 when something like a 403 would probably be more accurate.
If this happens, you have to make sure that the user trying to import the project has access to the repository. Usually, you can do that by checking “collaborators” or “members” in the UI of your Git provider, i.e. GitLab or GitHub.
There are no accounts in Mattrbld. If you’d like to collaborate with someone on a project, you have to make sure they also have an account with the Git provider that is hosting your repository.
Once they have access, they should be able to import the project without issues. If it still doesn’t work and the repository URL is definitely correct, make sure that they’re using the right credentials for logging in.
It is recommended to use an access token instead of a password to authenticate through Mattrbld for security reasons. However, the access token has to have the right permissions (read and write repository) for this to work properly.
To Conclude
Unfortunately, a 404 when importing a project into Mattrbld doesn’t always mean it’s an actual 404 – Not Found error. If you’ve double-checked the repository URL, and it is correct, it may be that whoever is trying to import the project doesn’t have access to the Git repository itself. Mitigate that and all should be well!