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

Level 28. Push - No remote - File name too long. #201

Closed
nathaniel-miller opened this issue Jan 17, 2016 · 8 comments
Closed

Level 28. Push - No remote - File name too long. #201

nathaniel-miller opened this issue Jan 17, 2016 · 8 comments

Comments

@nathaniel-miller
Copy link

When I first run/reset level 28 I get an error with a massive string of characters.

...fileutils.rb:1392:in `initialize': File name too long @ rb_sysopen - ... 117-5586-1s8nzqj/d20160117-55 ...etc. ... (Errno::ENAMETOOLONG)

Any attempt at solving it, ex: git rebase origin/master master, results in:
=>fatal: Needed a single revision
=>invalid upstream origin

git remote:
Does not display any remote repos.

git pull origin master:
=>fatal: 'origin' does not appear to be a git repository
=>fatal: Could not read from remote repository.

=>Please make sure you have the correct access rights
=>and the repository exists.

@Gazler
Copy link
Owner

Gazler commented Jan 18, 2016

This looks the same as #188 which I closed because I couldn't replicate it.

Could you please provide:

Operating System
Ruby version
Git version

Thanks.

@nathaniel-miller
Copy link
Author

I too am running on cloud9. And yes same exact thing. I ended up with a seemingly infinite series of nested folders called d20160118-12089-1bn4nyx or some variation. Each had an empty 'file1' inside along with another folder of the same name.

Cloud 9 is running:
Ubuntu 14.04.3 LTS
ruby version 2.2.1
git version 1.9.1

@nathaniel-miller
Copy link
Author

I sent you an invite to the c9 workspace so you don't have to try replicating it.

@Gazler
Copy link
Owner

Gazler commented Jan 18, 2016

@dukeoflaser That's fantastic, from that I should at least be able to see the issue for myself. I'll investigate it tomorrow. Thanks for setting this up.

@Gazler
Copy link
Owner

Gazler commented Jan 18, 2016

After a quick look - https://github.com/Gazler/githug/blob/master/levels/push.rb#L10 appears to be the offending line.

@Gazler Gazler closed this as completed in 8869b25 Jan 21, 2016
@Gazler
Copy link
Owner

Gazler commented Jan 21, 2016

Alright, I've tracked down the issue thanks to the provided workspace.

There are two things at play here:

  1. Normally Dir.mktmpdir makes a directory in a temporary location. However on c9, it appears to make it in the current directory. This wouldn't be an issue except for:
  2. There is a call to FileUtils.cp_r ".", tmpdir - since this copies everything, you end up with a copy of the temp directory nested (seemingly infinitely or 175 times in this case).

@Gazler
Copy link
Owner

Gazler commented Jan 21, 2016

@dukeoflaser I am done with that workspace now by the way. Thanks again for setting it up.

This should be fixed in 0.4.8

@nathaniel-miller
Copy link
Author

Great thanks! I look forward to giving it another try 👍

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