Change git account in specific project

My BitBucket account is globally installed for my git projects.

Now I have to use my Gitlab account from school for a project. When I try to clone the repository I get the error:

  • bitbucket Unable to merge Unrelated branches
  • The remote end hung up unexpectedly while Git push with large files
  • Bitbucket: fatal: HTTP request failed when trying to clone Git repo
  • pip install from bitbucket repo's branch
  • Git : How to reset the history of all the repositories associated with a project?
  • Bitbucket Pipelines - multiple branches with same steps
  • Cloning into '*****'...
    Permission denied (publickey).
    fatal: Could not read from remote repository.
    Please make sure you have the co

    I think that it is because I try to clone with my BitBucket account which is not connected to this Gitlab repository.

    Does someone know how I can change my config for only this project?

    Thanks for the help! 🙂

  • How to list all the log for current project in git?
  • Change a Git remote HEAD to point to something besides master
  • How to enforce a git commit message policy on local system to prevent pushing
  • how to solve git error while installing linkedin from git://
  • How to create a git repository on my server from the github server?
  • Clone TFS-GIT repository to GIT repository (Linux) by using GIT commands
  • 2 Solutions collect form web for “Change git account in specific project”

    You need to add your ~/.ssh/ in your GitLab account.

    Go to GitHub Profile | SSH Keys | Add SSH Key using browser. Then add a new SSH key with ~/.ssh/

    Create and Add SSH key

    Alternate, Change your clone URL from SSH to https. Then clone the repo with your GitLab username/password.

    The solution would be to add your ssh key as @sajib khan suggested.

    If you do not want to add your ssh key to gitlab, you can look and see if gitlab allows you to connect via http(s). If so then you can clone the repo with the http(s) link. If that is the case, then gitlab may ask you to login on occasion.

    Git Baby is a git and github fan, let's start git clone.