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

make.jl fails with git error #2464

Closed
rkube opened this issue Feb 23, 2024 · 1 comment · May be fixed by #2509
Closed

make.jl fails with git error #2464

rkube opened this issue Feb 23, 2024 · 1 comment · May be fixed by #2509

Comments

@rkube
Copy link

rkube commented Feb 23, 2024

Hi,
I'm trying to generate documentation for my project following these instructions: https://documenter.juliadocs.org/stable/man/guide/

I created a docs subfolder with make.jl :

using Documenter
push!(LOAD_PATH,"../src/")
using my_package

makedocs(sitename="my_package Documentation")

When I run make.jl I get the following error:

*[main][~/julia_envs/my_package/docs]$ julia --color=yes --project make.jl 
ERROR: LoadError: ArgumentError: Unable to automatically determine remote for main repo.
> `repo` is not set, and the Git repository has invalid origin.
Configure `repo` and/or `remotes` appropriately, or set `remotes = nothing` to disable remote source
links altogether (e.g. if not working in a Git repository).
  path: /Users/ralphkube/julia_envs/my_package
Stacktrace:
 [1] interpret_repo_and_remotes(; root::String, repo::String, remotes::Dict{Any, Any})
   @ Documenter ~/.julia/packages/Documenter/1HwWe/src/documents.jl:640
 [2] interpret_repo_and_remotes
   @ ~/.julia/packages/Documenter/1HwWe/src/documents.jl:499 [inlined]
 [3] Documenter.Document(; root::String, source::String, build::String, workdir::Symbol, format::Documenter.HTMLWriter.HTML, clean::Bool, doctest::Bool, linkcheck::Bool, linkcheck_ignore::Vector{Any}, linkcheck_timeout::Int64, checkdocs::Symbol, doctestfilters::Vector{Regex}, warnonly::Vector{Symbol}, modules::Vector{Module}, pages::Vector{Any}, pagesonly::Bool, expandfirst::Vector{String}, plugins::Vector{Documenter.Plugin}, repo::String, remotes::Dict{Any, Any}, sitename::String, authors::String, version::String, highlightsig::Bool, draft::Bool, others::@Kwargs{})
   @ Documenter ~/.julia/packages/Documenter/1HwWe/src/documents.jl:429
 [4] #makedocs#81
   @ Documenter ~/.julia/packages/Documenter/1HwWe/src/makedocs.jl:242 [inlined]
 [5] top-level scope
   @ ~/julia_envs/my_package/docs/make.jl:5

The git configuration for my_package works fine though and git origin is set correctly.

@jack-champagne
Copy link

Closed as completed but no note - adding my own here for those that stumble across this same issue. If you are on NixOS, read the whole error message because it is likely complaining about:

Could not start dynamically linked executable: /home/jack/.julia/artifacts/8cf34d79d19454822fddcbe0828c1858538ac1c9/bin/git
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
ERROR: LoadError: ArgumentError: Unable to automatically determine remote for main repo.
--- SNIP ---

Either do the workaround to get this to work in this type of env (maybe some yucky LD_LIBRARY_PATH stuff) or just use a different environment to build this

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

Successfully merging a pull request may close this issue.

2 participants