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

Remote repository URL cannot be https #42

Open
george-maroun opened this issue Jul 18, 2023 · 3 comments
Open

Remote repository URL cannot be https #42

george-maroun opened this issue Jul 18, 2023 · 3 comments

Comments

@george-maroun
Copy link

  • When the remote repository URL is set to https instead of ssh, the syncer.PushLocal returns an error: "takeover failed; error invalid auth method"

Specifically, the error is returned on line 711:

if err := r.Push(&git.PushOptions{
		RemoteName: remoteName,
		RefSpecs: []config.RefSpec{
			config.RefSpec(refSpec),
		},
		Progress: os.Stdout,
		Force:    true,
		Auth:     appAuth,
	}); err != nil && err.Error() != "already up-to-date" {
		return err
	}
  • Changing the remote repository to ssh fixes the error. To do so, run the following command:
    git remote set-url origin [email protected]:jlewi/roboweb.git

To check if the remote repo is set to https or ssh, run git remote -v
If the listed URL starts with https:// the repo is set to https

@jlewi
Copy link
Owner

jlewi commented Dec 16, 2023

@franciscouribe this is the issue you were hitting with hydros

@jlewi
Copy link
Owner

jlewi commented Jan 28, 2024

I think the fix here is to switch to using GitHubApp credentials consistently as part of #3

@jlewi
Copy link
Owner

jlewi commented Jan 28, 2024

I think I was mistaken. I think this is coming from the 'hydrod takeover' command. I think that might already be using go-git.

More importantly it's using the repo the user already checked out which is why the auth method selected by the user matters.

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