Giter Club home page Giter Club logo

Comments (17)

MikeTuomas avatar MikeTuomas commented on May 26, 2024 5

Running ssh-add resolved this for me. I am using macOS 11.3.1

from obsidian-git.

bramuccci avatar bramuccci commented on May 26, 2024 3

I ended up removing the passphrase. I know is not a good solution, but is a simple one.
ssh-keygent -p

from obsidian-git.

s-kyy avatar s-kyy commented on May 26, 2024 2

@Vinzent03 Whenever I open git bash, I:

  1. start the ssh-agent
  2. ssh-add the relevant keys + you get prompted for a password to type in here
  3. Do the usual git pull/add . / commit / push steps

I think if you don't add the ssh keys, then you get prompted for the password each time. Personally, I adjusted my ~/.bashrc file so that every time I open a git bash terminal I add my ssh keys + pw's at the beginning.

from obsidian-git.

s-kyy avatar s-kyy commented on May 26, 2024 2

@ZerkerEOD
Assuming you use Windows, and that you already setup your ssh keys I have two files in my ~/ user folder:

~/.bash_profile

# generated by Git for Windows
test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc

~/.bashrc (or ~/.profile):

eval `ssh-agent`
ssh-add 

Then in the ~/.ssh/config file:

Host github.com #custom name for the host
  HostName ssh.github.com #or other website directing to the host
  User git #usually your username, but github ssh takes git as the username
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_rsa #add your ssh-key file path

AddKeysToAgent yes

It's been a while since I modified this setup, but I think this is all you need. This would prompt a password (if there is one) for your ssh keys that you're adding every time you open git bash (linked to Git for Windows).

Hope it works for you.

from obsidian-git.

cybersholt avatar cybersholt commented on May 26, 2024 2

Depending on your setup with Windows 10 you may need to add this via an elevated console, only if you're using OpenSSH for Windows

git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe

from obsidian-git.

icaroo avatar icaroo commented on May 26, 2024 1

Same here, but Windows user.
I'm using gitbash, works ok by command line.

from obsidian-git.

Vinzent03 avatar Vinzent03 commented on May 26, 2024 1

When you use the default terminal and start the ssh-agent and run ssh-add. And type in your passphrase. Does the issue still persist? I can't help more, because I am on Linux.

from obsidian-git.

Kabobi avatar Kabobi commented on May 26, 2024 1

I solved this problem by setting the default SSH user, in the ~/.ssh/config file:

 Host *
    User your_default_ssh_user
    IdentityFile ~/.ssh/your_default_ssh_key

from obsidian-git.

NurgisaA avatar NurgisaA commented on May 26, 2024 1

i am using manjaro and ssh-askpass not defined, but system used ksshaskpass. Im trying use alias, but this dont work. How to fix it.

upd: im fixed by setup to "Additional environment variables"
SSH_ASKPASS=/usr/bin/ksshaskpass // or you path

from obsidian-git.

s-kyy avatar s-kyy commented on May 26, 2024

Same issue on my end with Windows, I only have one ssh key linked to github, so maybe it needs to save the ssh password?

from obsidian-git.

Vinzent03 avatar Vinzent03 commented on May 26, 2024

When you use your ssh key, you have to type in your ssh-key password right?

from obsidian-git.

Vinzent03 avatar Vinzent03 commented on May 26, 2024

The problem is the passphrase . Will take a look how to solve this.

from obsidian-git.

s-kyy avatar s-kyy commented on May 26, 2024

Using the git bash terminal, entering ssh-add and leaving it open while I run a git pull from Obsidian, I get the same error:
image

I haven't set it up using the Windows command terminal before, but maybe this link would help? https://stackoverflow.com/a/40720527

from obsidian-git.

Vinzent03 avatar Vinzent03 commented on May 26, 2024

Well you have to tell me if this works. That has nothing to do with this plugin.

from obsidian-git.

ZerkerEOD avatar ZerkerEOD commented on May 26, 2024

@s-kyy, sorry I know this is closed but wondering what you did to prevent being asked every time rather than the first time when opening the terminal. Is there a way to check if the key has already been added?

from obsidian-git.

jakobbohem avatar jakobbohem commented on May 26, 2024

was able to work around this by enabling Windows 11:s OpenSSH executable in git (re-running the installer, making sure to select Windows OpenSSH as the preferred version) and running the ssh-agent as a Windows service according to the guide here https://interworks.com/blog/2021/09/15/setting-up-ssh-agent-in-windows-for-passwordless-git-authentication/

Good luck everyone struggling and let me know if this works for anyone! :)

from obsidian-git.

veggie-garden avatar veggie-garden commented on May 26, 2024

ssh-add also works in windows 11! I followed what exactly written over here. Thanks for all the information everyone.

from obsidian-git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.