Errors when working with git

«Repository … not found»

  • If you cloned the repository, it could have become the main one. In this case, you should simply run the git push command (without main, master, etc.)

  • Additionally, check the correctness of the command, that you did not mix up - and _, etc. Check that you are pushing to the right project from the current account.

  • Try to push from another console (GitHub Desktop as an example).

  • Check if you have linked the repository ( git remote -v )

  • Check if the authorization is performed from the right account. So, if you have several accounts in Amverum, you can try to do a push/pull to another account, where such a repository, of course, does not exist and it is necessary to reset authorization data

«faild to push some refs to …»

Unable to load some links

  • You may have loaded files/config via the interface before.

You need to do a git pull (or git pull amverum master) to sync the project with the changes made from another device (from the interface).

No response to push

Pushed, but nothing happens (build doesn’t start, logs are empty, etc.). Probably, push didn’t reach master branch of remote repository.

  • The push goes not to master, but to main

    If the main branch is not called master, but, for example, main, an error will appear when running the command git push amverum master.

    In this case, run the command:

    git push amverum main_branch_name:master
    

    So, for example, if your main branch is called main, the command would look like this:

    git push amverum main:master
    

    To find out what the main branch is called (assuming you are on it):

    git branch --show-current
    
  • Git update is not working correctly (when the project is running and data needs to be updated)

    A common mistake is the wrong sequence of git commands (when the project is already running and you need to update it). The symptom is the response of the git command when you changed the code:

      Everything up-to-date
    

    The following sequence of commands will help you:

    git add . # Add all changes made in this folder to the list of indexed ones
    git commit -m "Description of changes made"
    git push amverum master
    

    Don’t forget about the dot in the first command - it is needed if you want to add all files to the index. If you want to add only some files to git, you should separately run git add <file_name> for each of them or exclude unnecessary files from indexing by writing a .gitignore file.

Old authorization data is used

If you get a 404 error when cloning or pushing to an Amverum repository, but you are sure that you have entered the repository address correctly (for example, copied it), most likely the git client is trying to log in with the remembered credentials of another repository (GitHub, Heroku, Amverum, etc.). In order to log in with Amverum credentials, you need to «forget» the old credentials.

For Windows
Control Panel -> Credential Manager

In the Generic Credentials section, find the git credentials (usually starts with `git:`), expand them and click the `Remove` button).

After this, the git client will ask for login details again.
For Mac OS

In the command line, run the command:

git credential-osxkeychain erase

The command will not output anything. Type the following into the command line:

host=git.amverum.ru
protocol=https
After that, press the `<Return>` key twice. The command will exit. After that, the git client will ask for login details again.
For Linux
Open the `$HOME/.git-credentials` file in a text editor and delete the entries you want. The git client will then prompt you for login information again.

An alternative option is to run the command

git config --global --unset user.password
  • Configuration file missing in repository root

    Without a yaml or dockerfile configuration file, the build will not be able to start. Instructions on how to write and add a configuration file are in the [Configuration file] section (https://docs.amverum.ru/books/amverum/page/fail-konfiguracii).

  • Two-factor authentication is enabled

    Sometimes, when trying to log in to the console with two-factor authentication enabled, you may see an authorization error. We recommend disabling two-factor authentication.

Note

If you have checked everything and have not found the cause, write to support@amverum.com, indicating the name of the application and nickname in the system. We will see what the problem may be and will definitely try to help.