How do I push/pull from Github over openconnect vpn with github ssh auth? - github

I'm using openconnect in Ubuntu 16.04 LTS to ssh into a remote machine over a vpn. I'm trying to push and pull to/from Github with ssh authentication, but it's not working. When I try to pull or push, it gives the error:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
When I connect with nomachine, I'm able to push/pull with Github no problem.
I've tried googling many different things, and haven't noticed anything yet in the options for openconnect or ssh that would help.
Any ideas?

The answer was simple: just set the git url to use the https version instead of ssh. You can also then cache the username/pass for https for a while: https://help.github.com/articles/caching-your-github-password-in-git/

Related

VertexAI GCP not allowing me to connect to Github via SSH keeps erroring

I have connected my managed notebook to Github using the instructions here
I cloned my repository using the HTTPS url which works fine only issues is it asks me for UN and PW every time I push or pull so I tried to clone the repository using SSH url which failed to work
I then tried these steps here to Switching remote URLs from HTTPS to SSH using
$ git remote set-url origin git#github.com:USERNAME/REPOSITORY.git
this failed to work also with VertexAI basically freezing up disconnecting from the HTTPS and not recognising the SSH
I have added the relevant SSH keys to my account using the instructions here
does anybody have any advice or any solutions
In short I want to be able to connect VertexAI managed notebook to GitHub via SSH to avoid having to re-enter by UN and PW every time I push or pull
I've tried to clone the repository using the SSH url no avail
I've also tried to change the remote repository using
$ git remote set-url origin git#github.com:USERNAME/REPOSITORY.git

Github SSH is connected but fails when cloning a repository into Digital ocean droplet

I'm setting up a laravel website with a Digital Ocean droplet.
This process is so difficult and frustrating, I'm losing logic sense...
I'm connected with an ssh key that is connected with github, because I tried this code to test my connection:
ssh -T git#github.com
with this as response:
> Hi (My name)! You've successfully authenticated, but GitHub does not
> provide shell access.
So it is connected.
However, when I want to clone my repository into my online droplet. I get the error:
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
So I have no idea how to fix this..
My ssh key inside my digital ocean settings is the same as in my github ssh settings.
Any ideas how to fix this?
I've found the solution myself!
So what was the problem?
I was using the ssh key from my localhost as an access key for cloning private github repositories. That is why I couldn't clone into an online service because that online service has it's own specific ssh key. So inside my server, I generated an ssh-key and registered that one on github. When I tried cloning me repo inside my droplet
everything worked as it should do.

Error in the checkout of a Github using Subversion with SSH - Linux Command line

Github recently enforced a no password rule with their repository access. I can't do two factor authentication, so, I am stuck with SSH keys. I want to use subversion, but when I try to checkout my repo, using:
svn co "svn+ssh://git#github.com/Oiubrab/ozzymandais.git"
I get the error:
Invalid command: 'git#github.com svnserve -t'
You appear to be using ssh to clone a git:// URL.
Make sure your core.gitProxy config option and the
GIT_PROXY_COMMAND environment variable are NOT set.
svn: E170013: Unable to connect to a repository at URL 'svn+ssh://git#github.com/Oiubrab/ozzymandais.git'
svn: E210002: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: E210002: Network connection closed unexpectedly
From the research I've done, I think I need to edit the /home/user/.subversion/config file, but i have no idea how and there is no documentation as to how to use svn with github with ssh. I have setup an ssh key and popped it on my github account. I just need to know how to setup the subversion tunnel to github.
I don't think that github supports the svnserve protocol.
AFAIK, you should generate a personal access token (PAT) in GitHub and use it as a password in the Subversion client. I.e., enter your PAT when the client prompts you for a password.

How to clone github private repository in cpanel (shared host without terminal or ssh)?

I have a shared host and they don't give me ssh or terminal for it.
I've tried to clone my private repos from git by Gitâ„¢ Version Control so I am using ssh link because they need permission. I don't know how to make ssh key on cpanel so I can make it from my mac and upload to cpanel and also add to Github.
But when running, they give me error: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists..
I'm a beginner for using Git & StackOverflow, so please let me know if there's anything wrong with the question I've asked. Thanks!
Tried Url with password
Cloning a private Github repo and
having a response "The clone URL cannot include a password."
This is different than what worked for the OP (hopefully they put their solution in an answer here).
I was able to solve this problem by installing an external SSH client (like PuTTY for Windows) and then SSH into my website using its IP address. Then I followed these steps from cPanel to connect the private repository.

GitHub, SSH & OS X Keychain Access

Setting up GitHub, and Im using SSH to connect. Following along hereto get all SSH set up. All is working well until i try to push an existing repository from the command line.
No problems with the following
git remote add origin git#github.com:<username>/first_app.git
But when I execut the following
git push -u origin master
things stop working.
My Keychain access dialog window pops up and wants the id_rsa password. Isn't this the passphrase I made up when i was following the steps on GitHub's how-to setup SSH? I think it is, but Keychain won't take the passphrase (I'm using this interchangeably with the word password).
I get: Permission denied (publickey).
fatal: Could not read from remote repository.
Can someone please help me connect the last piece of this puzzle so I can connect to GitHub via SSH? Thanks