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

Cannot determine forge repository for custom ssh host #545

Closed
ParetoOptimalDev opened this issue Mar 6, 2023 · 2 comments
Closed

Cannot determine forge repository for custom ssh host #545

ParetoOptimalDev opened this issue Mar 6, 2023 · 2 comments
Labels
support User needs some help

Comments

@ParetoOptimalDev
Copy link

I'm assuming this will be (and perhaps has to be) wontfix and the right answer is something like:

(add-to-list 'forge-alist `("paretooptimal-github" "api.github.com" "github.com" forge-github-repository)
(add-to-list 'forge-alist `("paretooptimal-github-work" "api.github.com" "github.com" forge-github-repository)

If that is the case I suppose tnis issue can function as documentation.

I expected forge to work correctly with my remote that uses a custom host in ~/.ssh/config. I have two hosts:

  • paretooptimal-github
  • paretooptimal-work-github

used like:

git+ssh://paretooptimal-github/NixOS/nixpkgs.git

I observed this error:

Cannot determine forge repository.  git+ssh://paretooptimal-github/NixOS/nixpkgs.git isn’t a forge url

Backtrace:

Debugger entered--Lisp error: (error "Cannot determine forge repository.  git+ssh://pare...")
  error("Cannot determine forge repository.  %s isn't a for..." "git+ssh://paretooptimal-github/NixOS/nixpkgs.git")
  #f(compiled-function (url &optional remote demand) "Return the repository at URL." #<bytecode -0x1469c1b25ccaf01e>)("git+ssh://paretooptimal-github/NixOS/nixpkgs.git" "upstream" t)
  apply(#f(compiled-function (url &optional remote demand) "Return the repository at URL." #<bytecode -0x1469c1b25ccaf01e>) "git+ssh://paretooptimal-github/NixOS/nixpkgs.git" ("upstream" t))
  forge-get-repository("git+ssh://paretooptimal-github/NixOS/nixpkgs.git" "upstream" t)
  #f(compiled-function (demand &optional remote) "Return the current forge repository.\n\nIf the `forge-buffer-repository' is non-nil, then return that.\nOtherwise if `forge-buffer-topic' is non-nil, then return the\nrepository for that.  Finally if both variables are nil, then\nreturn the forge repository corresponding to the current Git\nrepository, if any." #<bytecode -0x14334adb8a4f514e>)(t)
  apply(#f(compiled-function (demand &optional remote) "Return the current forge repository.\n\nIf the `forge-buffer-repository' is non-nil, then return that.\nOtherwise if `forge-buffer-topic' is non-nil, then return the\nrepository for that.  Finally if both variables are nil, then\nreturn the forge repository corresponding to the current Git\nrepository, if any." #<bytecode -0x14334adb8a4f514e>) t nil)
  forge-get-repository(t)
  byte-code("\300\301\302!\303\"C\207" [eieio-oref forge-get-repository t id] 3)
  advice-eval-interactive-spec((byte-code "\300\301\302!\303\"C\207" [eieio-oref forge-get-repository t id] 3))
  #f(compiled-function (spec) #<bytecode 0x1dcd024b93c6a9ac>)((byte-code "\300\301\302!\303\"C\207" [eieio-oref forge-get-repository t id] 3))
  funcall(#f(compiled-function (spec) #<bytecode 0x1dcd024b93c6a9ac>) (byte-code "\300\301\302!\303\"C\207" [eieio-oref forge-get-repository t id] 3))
  command-execute(forge-list-pullreqs)
@tarsius
Copy link
Member

tarsius commented Mar 6, 2023

This format should not be used, see git/git@07c7782.

@tarsius tarsius added the support User needs some help label Mar 6, 2023
@tarsius tarsius closed this as completed Mar 6, 2023
@ParetoOptimalDev
Copy link
Author

This format should not be used, see git/git@07c7782.

Hm, not sure I agree... Looks like I'll have to chime in there!

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

No branches or pull requests

2 participants