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

repository 'default' does not exist #454

Closed
mmahalwy opened this issue Dec 15, 2016 · 17 comments
Closed

repository 'default' does not exist #454

mmahalwy opened this issue Dec 15, 2016 · 17 comments

Comments

@mmahalwy
Copy link

I cannot get around this error:

Setting up Oh My Fish configuration...
Installing package default
fatal: repository 'default' does not exist
Could not install package default. 1^
fish: Unknown command '2'
~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish (line 1): echo (omf::err)"Could not install $argv."(omf::off) 1^&2
                                                                                                                                         ^
in function '__omf.packages.install.error'
	called on line 49 of file ~/.local/share/omf/pkg/omf/functions/packages/omf.packages.install.fish
	with parameter list 'package default'

in function 'omf.packages.install'
	called on line 22 of file ~/.local/share/omf/pkg/omf/functions/bundle/omf.bundle.install.fish
	with parameter list 'default'

in function 'omf.bundle.install'
	called on line 6 of file ~/.local/share/omf/pkg/omf/functions/cli/omf.cli.install.fish

in function 'omf.cli.install'
	called on line 47 of file ~/.local/share/omf/pkg/omf/functions/omf.fish

in function 'omf'
@derekstavis
Copy link
Member

Hi @mmahalwy, thanks for your report!

What system and fish version are you using?

Could you also please check if the command below returns something?

git config --global core.autocrlf

@mmahalwy
Copy link
Author

fish: fish, version 2.4.0-231-gd885f00
OS: macOS Sierra
Git: git version 2.11.0

Command

git config --global core.autocrlf

Does not return anything

@oranja
Copy link
Contributor

oranja commented Dec 17, 2016

Hi @mmahalwy,
Two more troubleshooting questions:

  1. Do you sometimes have internet connection issues?
  2. Can you please paste the output from
    cat ~/.local/share/omf/db/themes/default
    ?

For some reason the installer assumed that default is a name of a plugin and not a theme. From there it looked for the URL in the wrong place and obviously failed to clone it.

Note to ourselves:
This is not the root of the problem here, but 1^&2 is not a valid syntax in fish 2.4.
Maybe it was sometime before and it changed. Now this should be 1>&2.

@sagebind
Copy link
Member

@oranja Looks like the redirection changed in 2.4: fish-shell/fish-shell#1873

This should be fixed in the install code.

@sagebind sagebind added this to the v4 milestone Dec 17, 2016
@mmahalwy
Copy link
Author

mmahalwy commented Dec 18, 2016

@oranja

  1. I was at Starbucks, so maybe
  2. https://github.com/oh-my-fish/theme-default

@oranja
Copy link
Contributor

oranja commented Dec 18, 2016

I thought maybe the clone was interrupted or corrupt, but (2) proves otherwise (besides, git or the installer probably would have noticed it).

Did you try again since then? Preferably after deleting the current ~/.local/share/omf folder.

Just to be sure, can you also paste the outputs of:

  1. command git --version
    to see if you have any wrapper around git that the installer doesn't see?

  2. test \( -e ~/.local/share/omf/db/themes/default \); and echo ok; or echo hmm
    just because that's pretty much the failing point.

  3. command git config --get-all core.autocrlf; or echo default autocrlf
    command git config --get-all core.eol; or echo default eol
    because this really smells like a line endings issue (we get these quite a lot with OS X).

@sagebind sagebind removed this from the v4 milestone Jan 3, 2017
@vitohuang
Copy link

Hi

I'm trying to install it

fish: 2.4.0
macOs: 10.12.3

But with the same issue

[I] swan@snappy ~/.config> curl -L http://get.oh-my.fish | fish
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 194 100 194 0 0 606 0 --:--:-- --:--:-- --:--:-- 606
100 16533 100 16533 0 0 26580 0 --:--:-- --:--:-- --:--:-- 26580
Existing installation detected at /Users/swan/.local/share/omf
Would you like to remove the existing installation? (y/N): y
This will uninstall Oh My Fish and all plugins and themes from
/Users/swan/.local/share/omf.
Are you sure you want to continue? (y/N): y
Uninstalling from /Users/swan/.local/share/omf...
Restoring backup file to /Users/swan/.config/fish/functions/fish_prompt.fish
Uninstall complete
Installing Oh My Fish to /Users/swan/.local/share/omf...
Using release channel "stable".
Cloning master from https://github.com/oh-my-fish/oh-my-fish.git...
Writing bootstrap to /Users/swan/.config/fish/conf.d/omf.fish...
Existent fish_prompt.fish found at /Users/swan/.config/fish/functions
↳ Moving to /Users/swan/.config/fish/functions/fish_prompt.1487972594.copy
Setting up Oh My Fish configuration...
Installing package default
fatal: repository 'default' does not exist
Could not install default.
Install aborted: Error installing plugins

Oh My Fish installation failed.

If you think that it's a bug, please open an
issue with the complete installation log here:

http://github.com/oh-my-fish/oh-my-fish/issues

@oranja
Copy link
Contributor

oranja commented May 29, 2017

Hi @vitohuang, @mmahalwy,

Seems like in #499 we got much closer to a solution for the same, or a similar problem. I'd like to find out whether it's the same issue for you or that we have more investigations to do. Can you please take a look and see if it leads you to a solution?

(And sorry for the long delay, this is really a strange issue)

@odGit
Copy link

odGit commented May 30, 2017

I am experiencing the same issue as @vitohuang
I am in Ubuntu 16.04 on Windows 10.
I am using CURL install.

Have following output for:

  1. git version 2.13.0
  2. cat ~/.local/share/omf/db/themes/default returns cat: /home/bob/.local/share/omf/db/themes/default: No such file or directory
  3. git config --global core.autocrlf returns true
    git config --global core.eol doesn't return

@ethanquix
Copy link

Using Ubuntu 16.04, same error than above, and my internet connection is good

@oranja
Copy link
Contributor

oranja commented Jun 3, 2017

@odGit, @ethanquix
Hi, this is a very strange problem and we're trying to figure out what's causing it, but it seems to be something very subtle, so we need as much detail as possible.

This includes:

  • The complete output from the install attempt. Censor sensitive information, sure, but don't "fix" anything that seems a little off. If you can, backup important data and try to remove any residues from previous attempts to install OMF ($HOME/.config/omf and $HOME/.local/share/omf), then close the active fish instances and try to install again with a fresh fish instance.
  • What exactly is your operating systems: when you say Ubuntu 16.04, please clarify if that's Ubuntu subsystem on Windows or a full Ubuntu distribution.
  • git and fish versions
command fish --version
command git --version
  • How did you install fish? Was it homebrew, linuxbrew, apt-get with default repositories, apt-get with fish PPA, or did you build from source?
  • Where is fish installed?
command which fish
  • Do you have more than one setup of fish?
  • git configuration, from these two commands:
command git config --get-all core.autocrlf; or echo default autocrlf
command git config --get-all core.eol; or echo default eol
  • The value of $HOME
echo $HOME
  • Any other clues you think might help get to the bottom of this.

Note that .../omf/db/themes/default is no longer relevant. Data is retrieved from an online repository instead of a local folder. If you still see it in your logs, that might be a big fat clue.
Anyway, any detail helps.

@odGit, it'll be easier to say for certain with a full log, but in your case, I suspect it's the core.autocrlf issue again (even though we thought we fixed it in #458). true value is rarely the desired option on OS X, so unless you know you need it that way, try setting it to input or clearing it (see this for a little more information)

@sagebind
Copy link
Member

sagebind commented Jun 3, 2017

@oranja Looking at the code path, this error could happen if omf.index.stat $name_or_url type repository fails for some reason, which tells me that there's something wrong with the package index for these users. I'll keep investigating.

Edit: Here's one thing I see. Before installing the default packages, omf install updates the package repos using omf.index.update. I would expect the install log to show that the default package repository was updated, but it was not. For example, here's a clean install log I ran just now:

curl -L http://get.oh-my.fish | fish
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   194  100   194    0     0    528      0 --:--:-- --:--:-- --:--:--   642
100 16622  100 16622    0     0  24017      0 --:--:-- --:--:-- --:--:-- 24017
Installing Oh My Fish to /home/nemo/.local/share/omf...
Using release channel "stable".
Cloning master from https://github.com/oh-my-fish/oh-my-fish.git...
Writing bootstrap to /home/nemo/.config/fish/conf.d/omf.fish...
Setting up Oh My Fish configuration...
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package default
✔ default successfully installed.
Installation successful!
⋊> ~ 

Note the line Updating https://github.com/oh-my-fish/packages-main master... Done! before Installing package default. I'm guessing there's a problem there somehow.

@odGit
Copy link

odGit commented Jun 6, 2017

@oranja
I am in Ubuntu shell on Windows 10 and my git version is git version 2.13.0

  1. Uninstalled fish and omf, and deleted manually /home/user/.local/share/omf
  2. Reinstalled fish with PPA
  3. fish --version returns fish, version 2.6.0
  4. git config --global core.autocrlf false
  5. mkdir code && chmod 644 code/
  6. cd code
  7. git clone https://github.com/oh-my-fish/oh-my-fish.git
  8. cd oh-my-fish/bin/install --offline
  9. PROFIT: Got my omf working!

I think step.4 solved my problem.

I need core.autocrlf set to true, because rest of the team is on UNIX systems. Let's see how it will work for me. I will keep you updated on my experience.
Thank you for your help.
I 💚 omf

@sagebind
Copy link
Member

sagebind commented Jun 6, 2017

@odGit @oranja Oh!!!! It all makes sense now!

We have a .gitattributes on the oh-my-fish repo, but not the packages-main repo. So since core.autocrlf was enabled, all occurrences of \n get turned into \r\n.

Then, when the installer installs the default plugins, it tries to install the theme named default. So it looks up a package named default with type = theme, but all it found is default with type = theme\r (notice the \r) and assumes the word default must be a URL and not a package name. So then it tells Git to clone default, which of course fails.

The fix is to add a .gitattributes file to the packages-main repo also. I'll do that now.

@oranja
Copy link
Contributor

oranja commented Jun 7, 2017

duh!! I was staring long and hard at the .gitattributes file on this repo, with a stern "you had one job!!" accusation, and completely forgot about packages-main.

Sharp as always, @sagebind

@sagebind
Copy link
Member

sagebind commented Jun 7, 2017

This should now be permanently fixed; closing this issue. (It looks like the original issue was solved by #459 as well.)

@sagebind sagebind closed this as completed Jun 7, 2017
@trancef0rmer
Copy link

Can not install omf.
OS Arch Linux
fish 3.0.0
git 2.20.1
git config --global core.autocrlf false

`Checking for a sane environment...
Installing Oh My Fish to /home/user//.local/share/omf...
Using release channel "stable".
Cloning master from https://github.com/oh-my-fish/oh-my-fish.git...
Setting up Oh My Fish configuration...
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package default
fatal: repository 'default' does not exist
Could not install default.
Install aborted: Error installing plugins

Oh My Fish installation failed.
`

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

No branches or pull requests

8 participants