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

Missing credentials #170

Open
cstjean opened this issue Mar 17, 2020 · 8 comments
Open

Missing credentials #170

cstjean opened this issue Mar 17, 2020 · 8 comments

Comments

@cstjean
Copy link

cstjean commented Mar 17, 2020

When tagging, I'm hitting ERROR: MethodError: no method matching read(::Nothing, ::Type{String}) on this line. The comment is explicit: # TODO Check for creds===nothing if there are no credentials stored however I have no idea how to fix it. Should I configure my system differently? We do authentication with SSH to private github repos. Is that the issue?

@davidanthoff
Copy link
Collaborator

Yes, this only works if you have https credentials stored in a credential store. I'm also using that credential to access the github API.

@cstjean
Copy link
Author

cstjean commented Mar 18, 2020

Ok. So from my cursory look and experiments, it looks like SSH support would require significant effort? We might be able to help.

@davidanthoff
Copy link
Collaborator

Any help would be great! Right now the whole code is this one endless function, really not well structured...

I think roughly the strategy should probably be to a) use git command line for anything that interacts with remote git repos, that way it should automatically work with SSH, and then b) provide an option to manually somehow specify credentials that are used in the code for the calls to the Github API.

@davidanthoff
Copy link
Collaborator

Actually, I just looked through the code, I think a) is already how it is done right now. So it might be enough to just have an alternative for https://github.com/JuliaLang/PkgDev.jl/blob/master/src/tag.jl#L46 line here to get everything to work.

@davidanthoff
Copy link
Collaborator

#171

@cstjean
Copy link
Author

cstjean commented Mar 20, 2020

If ssh is properly configured, ssh -T git@github.com tells you so, so perhaps we just need to skip getting/passing around the credentials? I'll look into it.

@cstjean
Copy link
Author

cstjean commented Mar 20, 2020

NVM, I misunderstood; you're right, we need github credentials of course.

@oxinabox
Copy link
Contributor

Even after #171
There are still a number of places in the code where it assumes creditials are available, and gives a bad error message

For example

julia> PkgDev.enable_pkgbutler("ProjectManagement")
ERROR: MethodError: no method matching read(::Nothing, ::Type{String})
Closest candidates are:
  read(::FilePathsBase.AbstractPath, ::Type{T}) where T at /Users/oxinabox/.julia/packages/FilePathsBase/YFK4h/src/path.jl:757
  read(::Base.AbstractCmd, ::Type{String}) at process.jl:421
  read(::AbstractString, ::Type{T}) where T at io.jl:434
  ...
Stacktrace:
 [1] configure_deploykey(repo::String, force::Bool)
   @ PkgDev ~/.julia/packages/PkgDev/utsVc/src/pkgbutler.jl:110
 [2] enable_pkgbutler(package_name::String; channel::Symbol, template::Symbol, force::Bool)
   @ PkgDev ~/.julia/packages/PkgDev/utsVc/src/pkgbutler.jl:51
 [3] enable_pkgbutler(package_name::String)
   @ PkgDev ~/.julia/packages/PkgDev/utsVc/src/pkgbutler.jl:26
 [4] top-level scope
   @ REPL[3]:1

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

3 participants