Cloning a private Repo hangs for new 2.32.0.windows.1 version of git - windows

Question:
Why does git-bash hang when cloning a non-public repo when installed with defaults?
Context:
I ran into this issue when trying to clone a private GitHub repo on my co-workers Windows 10 machine.
Steps to reproduce:
Installed the newest version of git bash for Windows (for at the time of writing this post for me was 2.32.0.windows.1). Choosing all of the defaults.
Run git clone [http-link-to-private-repo]
Expected:
A popup to enter username and password information.
My Hack Solution:
When installing 2.32.0. for windows check the "Enable experimental support for pseudo consoles.".
This allows the bash console to present you an option to authenticate via a web browser or a personal access token.
Unrelated Note:
I originally was looking to post this on the Github Issues page for Git but they don't have one so here I am. Not sure if this is the appropriate place to post this but I wanted it somewhere so another person doesn't run into the same trouble.

Many thanks this was the solution after everything else failed including setting up a new installation, a new access token, and trying to find faulty config files.
After updating my personal access token this behavior also occurred with git 2.28.0.
So i did an update to the newest git version and afterwards the above mentioned steps.
(Sorry, i can not make any comments directly.)

I also ran into this problem setting up my dev environment for a new work laptop... Thankfully I had an older Windows GitBash installer (2.31.1) so I ended up downgrading to the older version. Worked like a charm, for me but understand it may not be an option for everyone.

Related

Upgraded to rails 5.2, and now when I push to heroku, why is it being prevented because of git-LFS (which I'd never heard of before today)?

"This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push."
I've never heard of git-LFS, much less installed it, before. This repository was pushing to heroku just fine for 2+ years.
I recently made a new fork so I could try upgrading to rails 5.2 and ruby 2.4. I got it all sorted and pulled my master FROM that fork, so my master is now rails 5.2 and ruby 2.4.
But I can't push it to heroku because of the above error.
I have no idea where git-LFS came from. I never installed it, and now I don't know how to get rid of it.
If anyone knows why I can't push to heroku, or how to disable this git-LFS (that feels like malware), please let me know! I've been searching for hours :(
Git LFS is an extension to Git that provides better handling of large files than native Git. When you use it in a repository, it installs hooks to ensure that the LFS files are pushed when you push your repository.
You should check your repository for a .gitattributes file. If there is one, and it contains entries that say filter=lfs, then your repository is using it to store large files. If not, then you can fix this by removing the hook in .git/hooks/pre-push, as the message says.
You haven't specified what operating system you're using or where you get your software from, so I can't tell you how it likely got installed, but it is currently removed from your system, which is why you see the message. It may have been installed through your system package manager, such as dpkg or Homebrew. If you're running on Windows, it's shipped as a standard part of Git for Windows.
I'm on a Mac. It really was as simple as deleting that file. It didn't occur to me at first that it was literally just a file in a folder on my hard drive because files and folders don't start with a period. And everything I'd read said to delete it from my repository; I read that and I'm thinking it's on github somewhere, not my local drive. Then I looked in my app's folder and saw a .git folder at the top, and from there it was obvious.

visual studio git: terminal prompts disabled

I cloned a VSTS (NOT GitHub) repository with bash on windows using URL like https://myproj.visualstudio.com/repo and now I'd like to be able to use in-built VS2017 git window for my work, however when I do say Pull I get a window asking for my username/password and after I provide them I get this error:
Git failed with a fatal error.
could not read Username for 'https://myproj.visualstudio.com': terminal prompts disabled
which doesn't make any sense to me, I'm still able to do everything from git bash, I was also able to use VS2017 in-built window until today (we had some accounts migration which I'm not aware of the details), I tried relogging everywhere (at least what I'm aware of) and reinstalling git/visual studio, but still no success. All the suggestions I was able to find are either related to GitHub or suggest me to use ssh, which I don't want to, because my colleagues still have it working quite fine with https as before
A workaround for me was to download and install TortoiseGit and then get a repository cloned through its credential manager. Afterwards, I connected to the repository within Visual Studio 2017 as a local repository.
In this approach we have to use TortoiseGit for all repo operations.
Better to try these instructions, which completely resolved my issue:
https://www.danielcrabtree.com/blog/176/how-to-fix-fatal-error-with-git-in-visual-studio-2017
Turns out I had to delete contents of this file:
C:\Users\my_user\.ssh\known_hosts
I didn't see it documented anywhere, it was just one of my numerous random attempts to fix things

Xcode Server won't build because source control information is in an invalid format

I have XCode Server set up with XCode 6.4 and OSX Server 4.1.5. I had integrations running fine until I transferred my git repository to another bitbucket account. No big deal right? Wrong for me :(. After I transferred my repository, I changed my git remote, I changed the repository location in Preferences in Xcode on my dev computer as well as on my server. Regular git functions are working fine from the command line and from within XCode. Nothing seems wrong until I try to run an integration and then it gives me the following build service error:
Could not check out sources because the source control information is in an invalid format.
I tried deleting my bot and creating another one. I tried cloning my project straight from the new location into another folder in case something had gotten out of sync. I git reset hard to the remote branch just in case even though there was nothing different. I tried cleaning and restarting everything multiple times. I reset XCode Server too (sudo xcrun xcscontrol --reset) and am still getting the error making me think I really did somehow mess up my git repository as far as XCode is concerned, but I have no ideas about what XCode doesn't like about my source control information. Does anyone have any ideas for what I can do or try? I've been tearing my hair out for hours.

Github, how to debug "failed to refresh the working directory"

I am using the newest GitHub for windows, and this occasionally happen
always suggesting I debug the repo in shell.
I am looking to learn how to do this debug
Is there any source that explains all (or even most) common problems that would cause this?
The repo seems ok when used from command line.
The specific case that is driving me crazy now is a Heroku project I'm trying to work on with a friend who uses Mac. Not sure if that is related, and I want to learn how to debug the general case, but any tips here would be useful as well
Running GitHub with administrator rights resolved the problem as well :)
You can find the "GitHub for Windows" log in
# WinXp:
C:\Documents and Settings\LoginName\Local Settings\Application Data\GitHub
# Or Win7:
C:\Users\LoginName\Local Settings\Application Data\GitHub
I have seen this message:
on authentication problem (I used it in a corporate environment)
when Windows keep an handle on some resources which should be updated by the git pull.
I usually keep a bash opened (launched from the "GitHub from Windows" GUI) in order to repeat the failed GUI operation as a git command.

"Clone in Mac' fails on GitHub. Takes me to download page every time

I've reinstalled, uninstalled, restarted but "Clone in Mac' on any repository page fails and takes me to the GitHub download page every time.
It was working fine earlier this week but today won't do anything useful.
Any idea why?
It appears not only do you have to log in to the website, you have to log in to the application once as well so it knows you've got it installed. Then refresh the git repo page and the links will automagically change from the download page to an open-application page.
I tried the above suggestions of making sure I was logged in to both the site and the Github-Mac application (which I already was) and installing the CLI tools. This didn't fix it for me. After some digging I found this article which explains how it works.
There should be a server listening on your localhost with https://ghconduit.com:25035/status and it should return a json string that looks something like this:
{"capabilities":["status","unique_id","url-parameter-filepath"],"running":true,"server_version":"5"}
In my case I did not get a result so I tried 127.0.0.1 instead of ghconduit.com and that fixed it.
TL;DR: Add an entry for 127.0.0.1 ghconduit.com to your /etc/hosts file and refresh the github page you are on and the clone on desktop function will work.
As was noted in the comments: You must be logged in to Github for the "Clone on Mac" button work.
(This answer serves mostly to remove this question from the "unanswered" list, since the asker does not seem to be closing it)
Even doing all the above failed for me, but here's what did work:
Open a new tab.
Paste this in the address bar (without quotes):
"github-mac://openRepo/"
On the repo you want to clone, copy the HTTPS clone URL, and paste it after the link above. Press enter.
If the server is listening on your Mac #rjason-lindberg mentioned, then it should open up in GutHub for Mac.
I just had this problem, and I found two steps necessary to get it working: the "log in" answer above, and to open GitHub.app, got to Preferences > Advanced > Install Command Line Tools.
This took no time. I then refreshed the github page, and saw that the link now led to something like: "github-mac://openRepo/https://github.com/......"
Click it and it worked.
I have answered my own question: the trick is TO BE LOGGED IN on the GitHub website. As stated by Neil above, you need to be logged into the application too.
I just tried this and it seemed to work.
Go to Keychain Access and delete all stored passwords (Internet,
application, Web form) with reference to GitHub.
Login in fresh on to the site as well as from the Mac OS desktop application
Store the passwords this time
None of the other answers did the trick for me. But seeing that neither https://ghconduit.com:25035/status nor https://localhost:25035/status was able to connect I realized that the Conduit process wasn't running. It's in "GitHub.app/Contents/Library/LoginItems/GitHub Conduit"
open that, and clone to desktop finally works again.
Don't know why GitHub.app didn't start it by itself, but at least it works now.
edit: After each reboot the GitHub Conduit process needs to be manually started again.
None of the other answers worked for me. I tried logging out (both GitHub and GitHub for Mac), revoking the application access key, quitting the application, reinstalling the GitHub command-line tools (via the Preferences pane), etc.
What did work for me:
Clone (Edit: I think I might have meant "Fork"?*) the repository on github.com. (Yes, through the web interface)
In the GitHub for Mac application, access File > New Repository... and choose "Clone". Select the repo you just created on github.com and clone on, my friend! Clone on.
*It has been a while since I wrote this answer, so I'm not sure if I actually did mean "Clone"... I understand that forking and cloning are certainly not the same thing. I'll leave this answer here in case it happens to inspire a thought for someone!

Resources