GitKraken: unable to open public key file - gitkraken

I installed GitKraken. Created a private and public key in the tab "General"
Then I connected Github and generated a new key.
When cloning a repository, GitKraken shows the necessary repositories.
I press the clone button. And shows an error
Please help me solve the problem. (Unable to open public key file)What's wrong?

The problem is that you have Russian letters in the folder name. Create a new ssh keys in another folder without Russian letters, or move existing ones.
I have same problem my solution:
Move .ssh folder from C:/Users/%username%/ to C:/Users/
Setting up GitKraken

Related

How to push code to a GitHub Repo using Code Sandbox for iOS (2022)

I had trouble (even called support) and they could not answer correctly as to how to push code from CodeSandBox (iOS version) to a GitHub Remote Repo. I keep getting failed to connect (even using SSH and/either regular authentication). (They did lead me down part of the path)
The way that I finally got it to work:
Essentially you have to use SSH (not HTTPS - this will not work!!!! on iOS)
On GitHub
First create your repo on Github (private or public), I selected to create a private one
copy the SSH name address
git#github.com:yourusername/yourprojectname.git
In CodeSandbox,
Add your repo name in the git settings from above
In the SSH Settings, hit the magic wand at the top and let it generate the public and private for you (this was the key....), do not generate a key on your own at your command line (IT WILL NOT WORK)
In the private key passphrase (leave this blank)
Change your branch in the settings to "main" as you GitHub Repo points to
Back in GitHub
Go to your Repo, go to the settings for your repo (not on your account)
Go to Deploy Keys
Add a Deploy Key, paste in the public ssh-rsa key from your code sandbox (that you let it generate), Make sure you check the box "Allow Write Access)
Then you can now commit and push to your remote repository (Took me three days of troubleshooting to figure this out) -:)

Getting Can't connect to any URI (not authorized) error while pushing the commit to github repo [duplicate]

I recently did a push to my GitHub repository for a few weeks ago. I got a main from GitHub that GitHub is soon quitting regular authorization and going to replace it with another authorization method.
So today I push a new update to my GitHub repository and got the message:
git-receive-pack not permitted
That's leads to two questions:
Has EGit stopped working now?
I have Eclipse 2021-03, how can I fix this issue so I can do a push?
Since August 13, 2021, GitHub does not support authentication via HTTPS with your GitHub account password for security reasons anymore. Instead, in Eclipse, when pushing to a GitHub repository or when fetching from a private repository, you will get a git-upload-pack not permitted on 'https://github.com...' error.
As solution, use either
a GitHub specific Personal access tokens as password instead of your previously used GitHub account password or
SSH with an SSH key of which the private and public key is on your local machine and configured in Eclipse and the public key is uploaded to your GitHub account instead.
Personal access token (GitHub specific)
Go to your GitHub account to Settings > Developer settings > Personal access tokens website:
Click the Generate new token button in the upper right
Enter a Note, e.g. GitHub repo token
Choose Expiration, e.g. No expiration
Tick the checkbox repo
Click the Generate token button at the bottom
Copy the generated token to the clipboard
In Eclipse, in the Git Repositories view:
Right-click the Remotes sub-node for GitHub (origin or the name you have chosen when you have cloned the repository) and choose Configure Push...
Click the Change... button to change the URI in the upper right
Replace the password with with the copied generated GitHub token
Click Finish and Save to apply the changes
SSH
Create an SSH key (skip this step when you already have one):
In Eclipse, in the preferences General > Network Connections > SSH2 tab Key Management hit the Generate RSA Key... button
Hit Save Private Key... and choose a location, preferably the subfolder .ssh of your user home directory
Upload public key to your GitHub account:
For a new created key, copy the string shown in the Key Management tab to the clipboard; for an existing key add it in the preferences General > Network Connections > SSH2 tab General and copy the content of the public key file <name>.pub
Go to your GitHub account settings to the SSH and GPG keys section and hit the New SSH key button
Paste the copied public key into the Key field
Change HTTPS to SSH URLs of already cloned repositories:
In Eclipse, in the Git Repositories view right-click the repository and choose Properties and click the Open button
In the text editor of the config file change the remote URL as follows:HTTPS (old; does not work for push anymore):url = https://github.com/<username>/<repo>.gitSSH (new):url = git#github.com:<username>/<repo>.git
See also:
Video tutorial Import repository from Github to Eclipse using SSH
EGit User Guide
GitHub has disabled the HTTPS protocol
Most certainly not.
I push using HTTPS to GitHub without any issue, but I now have to use, as password, a PAT (Personal Access Token) instead of the GitHub user account password.
Make sure to create a new token, which will follow the new token format (March 2021)
ghp_ for Personal Access Tokens
I was using eclipse and git with ssh and had an issue with it using the wrong key.
When searching for the error: "Cannot log in at github.com:22"
It sent me to this answer: Cannot log in GitHub into Eclipse which ended up leading me to this one.
For anyone else that stumbles across this you need to navigate to
Window -> Preferences
Then from there expand
General -> Network Connections -> SSH2
Then in the right pane select the "General" tab and click the Add Private Key.. button and select the private key used for git. If you used a password for your key (which you should) then you should be prompted to enter it.
After this I could push and pull again no issues.
You need to create an app password or token to import the project from git/bitbucket. This token you need to use as a password.
Here create a token by giving the necessary permissions according to your requirements and create it.

Eclipse Photon - Unable to clone - Transport Exception - not authorized [duplicate]

I recently did a push to my GitHub repository for a few weeks ago. I got a main from GitHub that GitHub is soon quitting regular authorization and going to replace it with another authorization method.
So today I push a new update to my GitHub repository and got the message:
git-receive-pack not permitted
That's leads to two questions:
Has EGit stopped working now?
I have Eclipse 2021-03, how can I fix this issue so I can do a push?
Since August 13, 2021, GitHub does not support authentication via HTTPS with your GitHub account password for security reasons anymore. Instead, in Eclipse, when pushing to a GitHub repository or when fetching from a private repository, you will get a git-upload-pack not permitted on 'https://github.com...' error.
As solution, use either
a GitHub specific Personal access tokens as password instead of your previously used GitHub account password or
SSH with an SSH key of which the private and public key is on your local machine and configured in Eclipse and the public key is uploaded to your GitHub account instead.
Personal access token (GitHub specific)
Go to your GitHub account to Settings > Developer settings > Personal access tokens website:
Click the Generate new token button in the upper right
Enter a Note, e.g. GitHub repo token
Choose Expiration, e.g. No expiration
Tick the checkbox repo
Click the Generate token button at the bottom
Copy the generated token to the clipboard
In Eclipse, in the Git Repositories view:
Right-click the Remotes sub-node for GitHub (origin or the name you have chosen when you have cloned the repository) and choose Configure Push...
Click the Change... button to change the URI in the upper right
Replace the password with with the copied generated GitHub token
Click Finish and Save to apply the changes
SSH
Create an SSH key (skip this step when you already have one):
In Eclipse, in the preferences General > Network Connections > SSH2 tab Key Management hit the Generate RSA Key... button
Hit Save Private Key... and choose a location, preferably the subfolder .ssh of your user home directory
Upload public key to your GitHub account:
For a new created key, copy the string shown in the Key Management tab to the clipboard; for an existing key add it in the preferences General > Network Connections > SSH2 tab General and copy the content of the public key file <name>.pub
Go to your GitHub account settings to the SSH and GPG keys section and hit the New SSH key button
Paste the copied public key into the Key field
Change HTTPS to SSH URLs of already cloned repositories:
In Eclipse, in the Git Repositories view right-click the repository and choose Properties and click the Open button
In the text editor of the config file change the remote URL as follows:HTTPS (old; does not work for push anymore):url = https://github.com/<username>/<repo>.gitSSH (new):url = git#github.com:<username>/<repo>.git
See also:
Video tutorial Import repository from Github to Eclipse using SSH
EGit User Guide
GitHub has disabled the HTTPS protocol
Most certainly not.
I push using HTTPS to GitHub without any issue, but I now have to use, as password, a PAT (Personal Access Token) instead of the GitHub user account password.
Make sure to create a new token, which will follow the new token format (March 2021)
ghp_ for Personal Access Tokens
I was using eclipse and git with ssh and had an issue with it using the wrong key.
When searching for the error: "Cannot log in at github.com:22"
It sent me to this answer: Cannot log in GitHub into Eclipse which ended up leading me to this one.
For anyone else that stumbles across this you need to navigate to
Window -> Preferences
Then from there expand
General -> Network Connections -> SSH2
Then in the right pane select the "General" tab and click the Add Private Key.. button and select the private key used for git. If you used a password for your key (which you should) then you should be prompted to enter it.
After this I could push and pull again no issues.
You need to create an app password or token to import the project from git/bitbucket. This token you need to use as a password.
Here create a token by giving the necessary permissions according to your requirements and create it.

How to use а private repository with VSCode?

A novice here, please type a small instruction describes how to use a private GitHub repo in VSCode
To configure a private repo, you first need to generate a public/private RSA key pair on your dev machine to be able to establish an ssh connection to your repo instead of an HTTP connection.
Just install Git for Windows in your development environment. During installation, please make sure that you have checked the option to include git bash, as you'll need it to create this key. Once installed, right click on your Windows user folder, select on Open git bash and then just run ssh-keygen (or if you are using Linux, you can just ssh-keygen) and go through the wizard.
This step will create a hidden .ssh folder that contains your public/private RSA key pair. Navigate to that folder.
The goal here with these keys is to configure your public key on GitHub. Open your id_rsa.pub file with notepad and copy its entire content. Then go to GitHub and under your user Settings > SSH keys just add a key and paste your entire public key plus an arbitrary name.
Now restart VS Code and press CTRL+ ' (Backtick) to open PowerShell and then run:
In case you haven't cloned your repo:
git clone git#github.com:{UserName}/{RepoName}.git
To Upload changes to your repo:
git add .
git commit -m "{Name for this commit}"
git push {Repo Origin name (default = Origin)} {Branch Name (Default = Master)}
Note. {} are for reference, do not include them in your commands.
VS Code has built-in support for Source Control, so if it is configured, VS Code will automatically detect changes and get them ready to commit with just a commit message and click. Also, there's a really good VS Core extension called GitLens. This can help you to 1-click push
That should do it. 😃
As of now (july 2019, not sure when this got added exactly) you can do this from within VSCode, just hit F1 in windows or ctrl+⇧+P (or ⌘+⇧+P on mac) to access the command palette of VSCode, then type or select Git: Clone and finally enter the URL of your repository, so something like https://github.com/MY_USERNAME/MY_PROJECT.git, finally choose the folder you want to use for your cloned repository (open the main folder that contains all your projects, no need to manually create a sub folder for the project itself, git will do this for you using the projects name)
To find your exact repository URL, open the projects github page and click on the green button on the top right that says "Clone or download", if you wonder if you should use HTTPS or SSH check out the github documentation
I had trouble with cloning a private repository from Github with VSCode. In my case the problem was that I followed Github docs instructions to generate SSH keys with Ed25519 algorithm and using these keys (id_ed25519.pub) with VScode and Github did not work for me.
I generated new keys with the RSA algorithm:
ssh-keygen -t rsa -b 4096 -C "your_email#example.com"
and after adding id_rsa.pub to my Github account settings VSCode started working with private repositories.
If Git is already installed
Copy the URL of your private repository
Go to the version control in VS Code
Click on clone repository (authentication required if not done already) and
Paste the copied URL in the edit text box as shown in the documentation.
i have same problem- but solution was simple:
Mistake was: in windows when you create a keys name should be "id_rsa" (windows cmd suggest rename yor keys).
if your key name is different simple rename private and public keys to "id_rsa" and "id_rsa.pub"
Then add keys via: ssh-add ~/.ssh/id_rsa (edit path if files in different).
Then add id_rsa.pub key to github profile settings(copy paste of content).
Now you can work with private repositories.
#Daniel summed it up but quick read for anyone who's having issues with generating ssh/adding it to github.
As #Kennet stated use ssh-keygen -t rsa -b 4096 -C "your_email#example.com" hit enter through, it will default to C:Users most likely.
Copy the ida_rsa.pub generated in github go to Setting -> Deploy keys (documentation I saw was outdated) and paste it in and name it ida_rsa.pub.
Note: Make sure to select "Allow write access" otherwise your pushes will be denied
If you want multiple ssh keys, this document explains how

SSH and Egit with Eclipse Neon

I have done the following:
Created the RSA 2048 with PuTTY, then saved the public and private keys at the location suggested by eclipse
Created the test repository at github and uploaded the public key to server
Created a HelloWorld project and added some text files
Problem:
Even choosing the Github SSH URL, I still get an authentication error message.
What else am I missing?
Make sure you reference the right folder in your Eclipse ssh configuration
And make sure the key generated through putty is not a ppk one, but an openssh one (id_rsa, id_rsa.pub). The id_rsa.pub content needs to be registered in your GitHub account.
And your ssh url needs to start with git#github.com (not yourlogin#github.com)