Feb 11, 2019 - Open a Git shell from within SmartGit: right-click the offending repository. All smartgit-http-* and smartgit-ssh-* files from the settings directory. Specify the path of the remote repository. The ssh format is: ssh://[email protected]/path/to/repository/repo.git. To access the repository for the TCF.
How do I generate and add an SSH key?
Last updated by Adam West on July 06, 2017 10:40
Before you can start pushing to Codebase, you will need to add an SSH key. The steps below will walk you through generating an SSH key and then adding the public key to your Codebase account.
Step 1: Check for existing SSH keys
Firstly we'll check your computer for any existing SSH keys. Open up Terminal and run:
Check the returned list to see if you have a file called
id_rsa.pub
, if you do you can skip to step 3 otherwise continue on to step 2.Step 2: Generate a new SSH key
To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.
Step 3: Add your SSH key to Codebase
Run the following to copy the key to your clipboard.
- Go to your My Profile page.
- Click 'Add new SSH public key'
- Paste your key into the form and enter a description to assist you with identifying it in the future and finally click Add Public Key:
Step 4: Make sure everything works
You can test that you have uploaded the key by running the following:
You may see the following warning, however this is perfectly normal, simply verify the fingerprint matches that shown below and type 'yes'.
If you see a message similar to that below, you have successfully added your SSH key and may continue to fetch and upload your repositories into your Codebase account.
If you receive a message, similar to
Permission denied (publickey,keyboard-interactive)
, this indicates your key has not been setup correctly.Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Hachiko movie online free. Sign in to your account
Comments
commented Jun 14, 2018
I'm currently playing with Git-LFS in combination with GitLab via SSH and noticed some problems (internal SmartGit 18.2 preview, Git 2.17.1, Windows 10). When having selected 'Use SmartGit as SSH client' in the SmartGit preferences, SmartGit sets GIT_SSH to smartssh.sh (SmartGit 18.1 still uses smartssh.cmd ) and GIT_SSH_VARIANT to ssh (the directory for 'smartssh.sh' is prepended to PATH). Git executes this command just fine (GIT_TRACE set to 1 ):but the Git-LFS filter has some problems: Could it be that Git-LFS tries to executed the SSH script in a different environment than Git? |
commented Jun 14, 2018
Hi @tmssngr, thanks for opening this issue and sorry that you're having problems. It looks like Git LFS is executing the SSH override fine (note the run_command: line in the trace output).But the SSH command itself is failing on [email protected] with the message:So, are you able to verify that that your remote is able to handle the command git-lfs-authenticate ? In other words, are you able to run the following yourself: |
commented Jun 15, 2018
Hi @ttaylorr, For testing purposes I've added echo '$@' >> /c/temp/smartssh.txt to smartssh.sh and judging from the content of /c/temp/smartssh.txt Git-LFS definitely fails to execute this script (while Git succeeds). It seems Git launches it with the help of its Linux-simulating environment while Git-LFS tries to execute it as a Windows application that obviously fails to handle .sh files. |
commented Jun 15, 2018
Hm. This seems like a bug, then -- @larsxschneider@sschuberth do either of you have thoughts? |
commented Jun 16, 2018
I wouldn't necessarily call this a bug in git-lfs but rather a missing feature. Windows cannot execute .sh files directly. In Git-for-Windows there's some logic to leverage sh if the file to execute is an .sh script. git-lfs would need to do the same and prefix the command line with sh -c if the file to run is an .sh script and we're on Windows. |
commented Jun 18, 2018
@sschuberth I see, thanks. It sounds like we need to do something similar for v2.5.0 (or later). I'll queue this for that. @tmssngr in the meantime, can you change your SSH environment variables to invoke sh instead? |
added bugenhancementwindows labels Jun 18, 2018
commented Jun 18, 2018
As an intermediate workaround we've switched back to using .cmd files on Windows. We need to avoid this because it causes problems with cmd.exe that is said to handle spaces in the path differently than Git. |
commented Jun 18, 2018
That's pretty vague (and the first time I hear this). Could you provide some details? In general, using .cmd on Windows sounds like the correct thing to do. |
commented Jun 18, 2018 • edited
edited
@tmssngr refers to an issue explained here: https://stackoverflow.com/questions/12891383 In short, cmd.exe employs its own commandline parsing rules and it doesn't like receiving TWO quoted parameters: This works: cmd.exe /c notepad.exe 'C:1.txt' cmd.exe /c 'notepad.exe' C:1.txt This fails with 'The filename, directory name, or volume label syntax is incorrect' cmd.exe /c 'notepad.exe' 'C:1.txt' You can try it yourself. When git wants to run some program, it will inspect every argument and quote it if it has spaces. Therefore, if for example a .cmd script accepts 1 argument, starting it will fail if both .cmd path and argument has a space. |
commented Jun 18, 2018
But this works: cmd.exe /c 'notepad.exe' 'C:1.txt' , i.e. simply but the whole string in quotes, too. |
commented Jun 18, 2018
That's true, but then git has to recognize it's going to use cmd.exe and tailor the commandline appropriately, which it currently doesn't do. |
modified the milestones: v2.5.0, v2.6.0Jul 25, 2018
commented Sep 6, 2018
I think this may be fixed if you use GIT_SSH_COMMAND instead of GIT_SSH on master (as of 7990ab1). That isn't in a released version yet, but I'd be interested to know if it fixes the issue for you.The difference is that GIT_SSH_COMMAND is passed to the shell (in git-lfs, as of the commit above) and GIT_SSH is not. |
modified the milestones: v2.6.0, v2.7.0Oct 23, 2018
modified the milestones: v2.7.0, v2.8.0Feb 26, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment