Reputation: 5039
I established ssh with github as instructed here:
https://help.github.com/articles/connecting-to-github-with-ssh/
I tested the ssh connection, but still no luck
iron@debian:~/Documents/websites/basic_setup_edited_20-08-2017@21-15$ ssh -T [email protected]
Hi alex3wielki! You've successfully authenticated, but GitHub does not provide shell access.
But after doing git push I get this:
iron@debian:~/Documents/websites/basic_setup_edited_20-08-2017@21-15$ git push
Username for 'https://github.com': alex3wielki
Password for 'https://[email protected]':
I tried switching the
url = https://github.com/alex3wielki/project-setup.git
to
url = ssh://github.com/alex3wielki/project-setup.git
as instructed in another post, but all it did was:
iron@debian:~/Documents/websites/basic_setup_edited_20-08-2017@21-15$ git push
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I know the repo exists, here's the link
https://github.com/alex3wielki/project-setup
When I change the repo link to
url = ssh://[email protected]/alex3wielki/project-setup.git
it doesn't prompt for password, but even after doing a change and going git add .
I get
Everything up-to-date
I'm using Debian 9. What am I missing?
Here is some more info
SSH "works"
But not really
I am in the root/top of the folder structure. git add .
and git push
are done from here
iron@debian:~/Documents/websites/basic_setup_edited_20-08-2017@21-15$ ls -a
. .. assets bower.json .bowerrc content _dev .git Gruntfile.js index.html node_modules package.json .sass-cache scripts
Upvotes: 1
Views: 130
Reputation: 1478
You have to add your ssh key to github, so that github knows that you are the only one how is pushing to the repo. You can learn how to create ssh key and add it to github here
In terminal
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Enter the desired passphrase and other information asked during the process.
First Start the ssh agent
eval "$(ssh-agent -s)"
Add your private key to ssh agent
ssh-add ~/.ssh/id_rsa
For addign your key to github you can follow the processs mentioned here
Upvotes: 1