Comments (17)
Running ssh-add
resolved this for me. I am using macOS 11.3.1
from obsidian-git.
I ended up removing the passphrase. I know is not a good solution, but is a simple one.
ssh-keygent -p
from obsidian-git.
@Vinzent03 Whenever I open git bash, I:
- start the ssh-agent
- ssh-add the relevant keys + you get prompted for a password to type in here
- 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.
@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.
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.
Same here, but Windows user.
I'm using gitbash, works ok by command line.
from obsidian-git.
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.
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.
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.
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.
When you use your ssh key, you have to type in your ssh-key password right?
from obsidian-git.
The problem is the passphrase . Will take a look how to solve this.
from obsidian-git.
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:
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.
Well you have to tell me if this works. That has nothing to do with this plugin.
from obsidian-git.
@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.
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.
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)
- [Bug]: Git pull for Git submodules fail when no upstream remote repo defined HOT 2
- [Feature]: Force pull / reset --hard HEAD HOT 6
- [Feature]: Multiple Repository
- [Bug]: plugin is not installing HOT 1
- [Bug]: Android: "%%%%%" on left of each line in source mode HOT 2
- using another git lib on android HOT 3
- [Enhancement] Multiple remotes support HOT 1
- [Bug]: Obsidian freezing from having any setting enabled HOT 1
- Feature request: Support Git move HOT 1
- [Bug]: GPG doesn`t work when program is .sh file or with ~/
- [Feature]: Make Auto Backup commits amendable HOT 1
- [Bug]: Git init doesn't work properly when a custom git-dir value is set through the 'Custom Git directory path' setting HOT 1
- [Bug]: git obsidian error: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'args[6]' must be a string without null bytes HOT 1
- [Proposal]: Rename the plugin to "Git Backup" HOT 1
- [Feature Request]: Push on Close HOT 1
- [Bug]: wrong order in git backup HOT 3
- [Bug]: Freshly installed plugin renders Obsidian unusable! HOT 4
- [Bug]: Persistent Authentication Requests HOT 2
- [Enhancement Suggestion]: Make .git folder outside of value folder by default HOT 2
- [Bug]: Plugin causes Micro lags
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obsidian-git.