Cannot clone with Git though all permissions have been set up -


i owner of assembla-account git repository. tried clone , have authentication errors.

what did do? created folder, did git init create initial .git directory. added per-project user-name , -email via

git config user.name "myproject" # set name git config user.email "myproject@mymail.com" # set email 

then created new ssh key via ssh-keygen -t rsa -c "myproject@mymail.com" , uploaded ssh key manager @ assembla's project page.

after tried git clone git@git.assembla.com:myproject.git, still error

error -- : permission denied fatal: not read remote repository. 

why still have authentications errors? if open .git/config, can see proper user-name , -email set in [user] section.

ps.: intentionally did not change global user-name , -email, project only, since global credentials multiple other projects.

if read question correctly, have server contains number of different projects, , have different ssh identity (public key) each project.

the username , email configure in git aren't used select credentials ssh connection; only/primarily used putting author , committer information every commit.

to set using correct ssh identity every remote repository, need use .ssh/config file. key configuration parameter identityfile:

host github.com     identityfile ~/.ssh/github.key 

because identify file defined per host , seem have multiple projects running on same server, need host alias trickery assign correct identity file each project:

host project1     hostname my-server-address     port 22     identityfile ~/.ssh/project1.key  host project2     hostname my-server-address     port 22     identityfile ~/.ssh/project2.key 

then use project1 , project2 in git clone url instead of my-server-address.

there's good, comprehensive description on how @ simplify life ssh config file.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -