Trouble pushing to Github, cannot spawn sh: No such file or directory

后端 未结 6 1354
陌清茗
陌清茗 2021-01-19 01:59

I\'m having a difficult time pushing to Github..I have a repository that I had cloned, and I have made changes to it that I\'d like to push back to github.

While in

相关标签:
6条回答
  • 2021-01-19 02:18

    This might be happening due to a large number of tags in your repo. Check this google-group entry, this question and another google group entry.

    Basically, this is a known issue with msysgit and users on google group suggest using the ssh protocol instead as workaround:

    1. Uninstall Git (this doesn't uninstall your existing repositories or SSH keys you've generated)
    2. Reinstall git at C:\Git
    3. Open git bash
    4. run this command: export GIT_SSH=/c/Git/bin/ssh.exe

    Also, the commit response you are getting suggests nothing got committed, do a git log to check if the commit actually happened.


    Another reason, as mentioned in this msysgit ticket could be the presence of spaces in your Environment variables. Moving the installation of msysgit etc to C: instead of C:\Program Files may solve it.

    0 讨论(0)
  • 2021-01-19 02:19

    I had the same issue with CLion on Windows 10 when trying to clone from a private repository on gitlab. However, the error vanished without reinstalling, when I added the git binary path (C:\Program Files\Git\bin for me) to the PATH variable.

    0 讨论(0)
  • 2021-01-19 02:23

    I had the same issue in IntelliJ IDE, what worked for me is to change the access of Git repository from private to public.

    0 讨论(0)
  • 2021-01-19 02:40

    I did the following steps and it worked:

    I deleted the .git folder I uninstalled the git from c:/program files I Uninstalled git bash too Installed the git and git bash now Initialized git I checked using the following commands and it worked:

    git checkout -b vettal // created a new branch 
    git push origin vettal // and then made a push
    

    Thanks for all the help made through various questions in stackoverflow!

    0 讨论(0)
  • The offered solution didn't work for me, what I had to do was reinstall Git with one important thing: Make sure to select "Attribute .sh files to git" during the install process and it seems to be all good now.

    0 讨论(0)
  • 2021-01-19 02:44

    I tried to use PowerShell or an external terminal rather than using WebStorm's Terminal and it worked for me. For me, the issue was while deploying the git code to Github pages. The build was successful but deploying to gh-pages was failing because of the above error.

    0 讨论(0)
提交回复
热议问题