Skip to content
New issue

Have 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? Sign in to your account

Rever requires password instead of using key #218

Open
anki-code opened this issue May 6, 2020 · 2 comments
Open

Rever requires password instead of using key #218

anki-code opened this issue May 6, 2020 · 2 comments

Comments

@anki-code
Copy link
Contributor

anki-code commented May 6, 2020

Hi! This is my first try to use rever.

I'm trying to avoid #216 and using ssh key instead of login and password. I've tested the key with github and it works:

git clone something from github
Enter passphrase for key '~/.ssh/id_rsa':

I deleted rever directory before try. But rever requires the login and password:

$ cat rever.xsh | grep TAG
$TAG_REMOTE = '[email protected]:anki-code/xontrib-prompt-bar.git'
$TAG_TARGET = 'master'

$ rever check
No checks needed for tag activity
All CLI and import requirements met for push_tag activity
Initialized empty Git repository in ~/git/xontrib-prompt-bar/rever/git-have-push-perm/.git/
~/git/xontrib-prompt-bar/rever/git-have-push-perm ~/git/xontrib-prompt-bar
Switched to a new branch '__rever__'
[__rever__ (root-commit) d9dd83a] Checking rever permissions
Username for 'https://github.com': anki-code
Password for 'https://[email protected]': 
fatal: Authentication failed for 'https://github.com/anki-code/xontrib-prompt-bar.git/'
# Because password auth disabled

What I'm doing wrong?

@anki-code
Copy link
Contributor Author

In my case I checkout repo from https remote address then run rever to push using ssh.

I've found that you're checking remote address and ignore PUSH_TAG_REMOTE format. It's not so clean logic. The best way is to check the format and if it like git@<...>:<...>/<...>.git try to use ssh first.

The workaround: add $PUSH_TAG_PROTOCOL='ssh'.

@scopatz
Copy link
Collaborator

scopatz commented May 31, 2020

It seems like you were doing everything right. $TAG_REMOTE = '[email protected]:anki-code/xontrib-prompt-bar.git' should have used SSH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants