wrong git repo owner

I try push a local repo to github and get such a message:

The remote end hung up unexpectedly.

ERROR: Permission to [repo_name] denied to [user_name]

But I can’t understand where it finds such a name. I have 2 ones on my local computer but for this repo I had set another name for the project explicitly,

  • Git Hooks - post-merge hook file not exist
  • Listing and deleting Git commits that are under no branch (dangling?)
  • Git subtree merge strategy or subtree command?
  • git pull --rebase origin tagname?
  • Can I have one project in two SVN repositories?
  • Authenticating users in git repository
  • cd project_directory


    git config user.name [right_user_name]

    and global:

    git config --global user.name [right_user_name]

    …user name.
    But it nevertheless thinks that a real name is [user_name] but not [right_user_name].
    Please help me to find the cause of this.

  • Where should the credentials for mysql be put?
  • git status gives me an error: bad index file sha1 signature
  • Is it possible to add file to multiple git repos at the same time?
  • mvn release:perform fails from a git branch: does the pom.xml need to have same version on master?
  • Git lfs - “this exceeds GitHub's file size limit of 100.00 MB”
  • Is there a way to get the latest tag of a given repo using github API v3
  • One Solution collect form web for “wrong git repo owner”

    In github, the authentication is solely done using SSH keys. So, whichever SSH key you are sending is used by github to find which account you are associated with, and that’s where “username” comes from.

    The git username is only used when you create new commits. Since a given person can push commits from anybody, it cannot be used by github for access rights (that would not be secure anyway …)

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