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

"brew file init "and "brew file update" is stuck after "brew file set_repo" #71

Closed
kosukemori opened this issue Dec 19, 2016 · 4 comments

Comments

@kosukemori
Copy link

Hi! I'm new to use this homebrew-file.
I tried to brew file XXX after brew file set_repo, it is stuck with git cloning.
Is this correct behavior?

The following output is after creating empty repo on github (kosmori/Brewfile).

~$ brew file set_repo 
Set repository, "non" for local Brewfile,<user>/<repo> for github repository,
or full path for the repository: kosmori/Brewfile
$ git clone [email protected]:kosmori/Brewfile /Users/kosmori/.brewfile/kosmori_Brewfile
Cloning into '/Users/kosmori/.brewfile/kosmori_Brewfile'...
warning: You appear to have cloned an empty repository.
~$ brew file init
$ git clone [email protected]:kosmori/Brewfile /Users/kosmori/.brewfile/kosmori_Brewfile
fatal: destination path '/Users/kosmori/.brewfile/kosmori_Brewfile' already exists and is not an empty directory.
can't clone [email protected]:kosmori/Brewfile.
please check the repository, or reset with
    $ brew-file set_repo
~$ brew file update
$ git clone [email protected]:kosmori/Brewfile /Users/kosmori/.brewfile/kosmori_Brewfile
fatal: destination path '/Users/kosmori/.brewfile/kosmori_Brewfile' already exists and is not an empty directory.
can't clone [email protected]:kosmori/Brewfile.
please check the repository, or reset with
    $ brew-file set_repo
@rcmdnk
Copy link
Owner

rcmdnk commented Dec 20, 2016

brew-file didn't expect an empty repository, sorry.
I've updated it to be able to manage empty repository.
Could you please try with updated brew-file.

@kosukemori
Copy link
Author

Thank you for update!
It works well!

Anyway, I think that git push is needed in the new error message for github user.

~$ brew file set_repo 
Set repository, "non" for local Brewfile,<user>/<repo> for github repository,
or full path for the repository: kosmori/Brewfile
$ git clone [email protected]:kosmori/Brewfile /Users/kosmori/.brewfile/kosmori_Brewfile
Cloning into '/Users/kosmori/.brewfile/kosmori_Brewfile'...
warning: You appear to have cloned an empty repository.
# Initialize the repository with README.md/Brewfile.
$ cd /Users/kosmori/.brewfile/kosmori_Brewfile
$ git add -A
$ git commit -m "Prepared by brew-file"
*** Please tell me who you are.
Run
  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'kosmori@XXX.(none)')

@rcmdnk
Copy link
Owner

rcmdnk commented Dec 20, 2016

This is because you don't have configuration in .gitconfig.
Although most of cases user.name/email should be set to use git,
I put checking function to check them to give similar warning w/o fatal stop.
If you want to manage Brewfile with GitHub's repository, it is better to set name/email following above instruction.

@kosukemori
Copy link
Author

The last comment is just for confirmation, never mind.
Anyway, thank you! Brew-file is working!

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