Bit bucket error while getting clone [duplicate] - repository

I've run into this serious error while committing, and created a bug report.
I keep getting this error on TortoiseGit operations:
git did not exit cleanly (exit code 128)
I've reinstalled the program, rebooted, and tried to clone a fresh repo from github - nothing seems to work. I also deleted %appdata%\Tortoise git folder ... I'm at a loss now. Any advice on how to proceed?

It's probably because your SSH key has been removed/revoked. Make a new one and add it to your GitHub account.

for me I simply had to add configure my git username and email with the following commands:
git config --global user.email "you#example.com"
git config --global user.name "Your Name"

If you're running windows 7:
I was trying to decide the best way to do this securely, but the lazy way is :
right-click the parent folder
click the "properties" button
click the "security" tab
click the "edit" button
click the group that starts with "Users"
click the checkbox that says "full control"
click all the OK's to close the dialogs.
I realize this might circumvent windows "security" features, but it gets the job done.

git-bash reports
fatal: Unable to create <Path to git repo>/.git/index.lock: File exists.
Deleting index.lock makes the error go away.

In my case a folder in my directory named as the git-repository on the server caused the failure.

Deleting index.lock worked for me

on win7 64:
git-gui gives a good answer: a previous git has crashed and left a lock file. Manually remove.
In my case, this was in .git/ref/heads/branchname.lock.
delete, and error 128 goes away. It surprises that tortoisegit doesn't give such an easy explanation.

In my case, it was because of the proxy. A proxy was needed in the corporate network and TortoiseGit / Git does not seems to automatically get information from Windows internet settings. Setting up the proxy address solved the issue.

For me, I tried to check out a SVN-project with TortoiseGit. It worked fine if I used TortoiseSVN though. (May seem obvious, but newcomers may stumble on this one)

In my case, I forgot to add git to the respository name at the end.

I did git revert a multiple times ,and it worked for me make sure un-check the files while reverting you need changes. Stash your changes and pull again.

I was having this same issue and I resolved it in the following way...
I have the NVIDIA "Tegra Android Development Pack" installed and it seems to also have a version of mysysgit.exe with it. TortoiseGit automatically found that installation location (instead of the standard git installation) and auto-populated it in the settings menu.
To correct this, go to: "Settings -> General" and there is a field for the path to mysysgit.exe. Make sure this is pointing to the correct installation.

An quick solution would be to create a new local directory for example c:\git_2014, In this directory rightklick and choose Git Clone

make sure the username and email fields are not empty in the config file. and try to clone to an empty directory. these steps worked for me.

although, it is a very old thread, recently I got this error, and in my case, the link was broken. When the link to GitHub was fixed, it worked.

What has worked for me:
Removing all offending branch related files from all folders in .git\ref and .git\logs

Related

#1558 - Column count of mysql.proc is wrong. Expected 21, found 20. Please use mysql_upgrade to fix this error

I got this message when I try to run query on XAMPP in macOS
#1558 - Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100108, now running 100421. Please use mysql_upgrade to fix this error
I tried to write
'mysql_upgrade -u root -p'
on my terminal but I got this message
zsh: command not found: mysql_upgrade
I also ran into same issue and after cracking my head for the past 10hrs, I finally realise how to perform the upgrade. U
go to your Mac terminal and paste the following code:
Applications/XAMPP/xamppfiles/bin/mysql_upgrade -u root -p
Supply your root password and see it work like magic.
Contrary to what many people posted online by using /opt/lampp/bin
It always gives a zsh not found error.
I hope this helps you and in the future for others who might need it.
You could try switching to a different shell, say bash by typing bash in your terminal.
Then proceed to run mysql_upgrade normally in the appropriate directory
I also could not run the code from the Terminal. I was, however, able to go to the folder itself and "run" the mysql_upgrade application. If you are using XAMPP and the Application Manager, there's a button to Open Application Folder. If you click that, finder will open where XAMPP lives. Open the bin folder. Then scroll until you find mysql_upgrade. Double click it. It will run in a Terminal session and complete the upgrade. Hope this helps someone else as I spent waaayyyy too much time trying to get this to work.

How to get GitKraken feature working - "Use local SSH agent"

In brief
What is the proper way to set SSH keys in GitKraken to work with different git github/bitbucket repos?
Full details
The feature is snapshot as below in GitKraken preference.
When I check Use local SSH agent, git pull/push/... commands stop working. Using git command from console works normally for me.
Currently I have to uncheck it, and select the ssh key I want to use which is quite tiring when working with multiple git repo providers.
My google search and search on our site result litle helpful, so I asked here.
Are you running gitkraken under linux? For me the problem was, that I had to export SSH_AUTH_SOCK for gitkraken to find the agent.
So I start gitkraken like this:
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" /usr/share/gitkraken/gitkraken
It can be a rare case, but if it could help at least someone:
For me perosnally, having the same issue after installing gitkraken, it did help to restart the computer after installation. Everything worked then.

Xcode: Could not read from remote repository

I am trying to connect Xcode with Git (Bitbucket).
I read this question/"tutorial":
In XCode 4 how do I add a remote GitHub repository to an existing local project?
I follow all steps but I have a problem.
In Xcode 4.6.1 I always obtain this error:
"fatal "my_Repo" does not appear to be a git repository fatal: Could not read from remote repository."
What can I do? I am very noob with XCode.
Thanks!
This is usually linked to the Bitbucket url you are using for your remote repo.
I prefer using at first an https url (not a git one, or an ssh one), as listed in this BitBucket doc page:
https://accountname#bitbucket.org/accountname/reponame.git
Make sure your repo name and user name are correct, including their case.
The problem is on Xcode, at the moment to make the "Push". Xcode always shows: "Commit or discard the changes and try again." And isn´t true, there aren´t changes
As in this answer, you need to add and commit at least one change in order to be able to push.
The OP Kaisser mentions this tutorial "12 steps to using GitHub with XCode 4".
What he did was:
create an empty project and make the commit and the push, all OK.
Then, I copied my current project and renamed it
I am seeing a similar issue, starting today. I haven't made any commits or pushes to my BitBucket repo in about 2 months, but I never had issues before. XCode is now telling me that the repository "could not be reached" and to "Please verify that the repository is online and reachable and try again". I can commit from the command line. I wonder if this is an XCode 4.6.1 bug?
PS - not sure if I put this in the right place. I've never posted on SO. Correct me if I did this wrong!

The local psql command could not be located

I'm following the instructions found here.
When I try to run $ heroku pg:psql or $ heroku pg:psql HEROKU POSTGRESQL_BROWN I recieve the following error message:
! The local psql command could not be located ! For help
installing psql, see local-postgresql
I can't find anything useful on the link it gives me (it just links to the instructions I was already using, but further down the page) nor can I find this error anywhere else.
If I've missed anything you need to know to answer this, just let me know. I'm rather new to all this and teaching myself as I go.
I had same error even after installing Postgres locally.
But after seeing this
I saw that "pqsl" was not in the PATH so I then did
PATH=%PATH%;C:\Program Files\PostgreSQL\9.2\bin
which worked for me
I have since solved this myself. When I ran heroku pg:info it says the version number is 9.1.8, I was locally running 9.2
installing 9.1.8 and ensuring Path pointed to the appropriate folder solved the problem.
After you change the path, make sure to restart the terminal!
Set the PATH. To find out the PATH of your psql script (on mac) open the sql shell script from your finder in Applications/Postgres installation. This will give you a hint as to where it is installed. That opened a window which told me it is located here: /Library/PostgreSQL/8.4/scripts/runpsql.sh
Then, I set the PATH variable from the terminal window by typing:
$ PATH="/Library/PostgreSQL/8.4/bin:$PATH"
(depends on the location of your PostgreSQL installation, find your bin path first, another exp: /usr/local/Cellar/postgresql#9.6/9.6.8/bin)
OR.....
You can also connect to the shell by opening the shell directly from your postgres installation folder. Then enter the credentials. If you don't know the credentials, here is how to find them out:
$ heroku pg:info
=== HEROKU_POSTGRESQL_RED_URL (DATABASE_URL)
$ heroku pg:credentials HEROKU_POSTGRESQL_RED_URL
Top answer wouldn't work for me oddly, my system would not add the Path via cmd with administrator access (Not sure why).
So check this > Windows key > environment variables > system variables
And add the last line (your version may differ in the path)
Make sure you've installed the toolbelt as psql is installed by default.
However you also need to ensure you've installed a local copy of PostgreSQL; if you don't the toolbelt will be unable to find the native psql client.
Assuming you have installed a local copy of PostgreSQL, make sure you can execute psql from the command line directly (i.e make sure you PATH is set correctly ). If the command does not execute, check your PATH, if it does execute see if you can connect via the PSQL connection string provided in the Heroku control panel. If you can connect reinstall the toolbelt, if you are unable to connect provision another dev database and try again.
If there are still issues, I would suggest contacting Heroku support for assistance after verifying no API issues are listed on the status page located here.
I got rid if this annoying message on Windows by adding a path element without the spaces, i.e.
C:\Progra~1\PostgreSQL\9.4\data
instead of
“C:\Program Files\PostgreSQL\9.4\data”
I followed the instructions here: http://www.computerhope.com/issues/ch000549.htm, which worked for me if you prefer to go the point-and-click configuration of the PATH variable.
This type of error usually appears in the Windows environment, because if you do not update the PATH after installing Postgresql, heroku pg:psql command does not work.
So you need to update your PATH environment variable to add the bin directory of your Postgres installation. The directory will look like this:
C:\Program Files\PostgreSQL\<VERSION>\bin.
For more information, go to the Heroku in Local setup website:
heroku-postgresql: Local setup
I had the same problem and discovered that Heroku doesn't seem to provision the latest version of PostgreSQL by default. Where the Heroku Getting Started instructions said
heroku addons:create heroku-postgresql:hobby-dev
That provisioned a v10 database for some reason (which you can check by clicking on Heroku Postgres in the Add-ons tab of your dashboard). I deleted that database and provisioned a new database using the --version flag:
heroku addons:create heroku-postgresql:hobby-dev --version 11
As of now, at least, you can find the latest version of Postgres supported by Heroku at this link: https://devcenter.heroku.com/articles/heroku-postgresql#version-support-and-legacy-infrastructure
I'm writing this in early 2019, but according to the PostgreSQL website the next version (12) is "tentatively scheduled" for third quarter of 2019 so if you're reading this in late 2019 potentially the same problem will come up for v12 instead
On Mac you can use the following:
export PATH="/Library/PostgreSQL/12/bin/:$PATH"
The only solution that I found on Windows:
go to advanced system settings
go to environment variables
select Path variable and click Edit
add a new line and enter your bin directory path (C:\Program Files\PostgreSQL<version>\bin) and click ok
restart your terminal
enter your psql command (heroku pg:psql)

"Git Bash here" isn't working when right clicking

I don't know, how that happened but before today I could right click on any folder and there would be and an option Git Bash here. But today I dont have that option. Anyone knows how to get that back?
HOW TO FIX WITHOUT RE-Installing:
I got this problem after moving all my programs off of my main hard drive and pasting them into my "P" drive. But kept all of the directory structures the same.
Git was moved from:
C:\DEV\PROG\GIT
TO:
P:\DEV\PROG\GIT
1: Open The Registry Editor:
Type "regedit" in start menu search and hit enter.
2: Find the context menu shortcut configuration for "git bash here"
In regedit: Menu "Edit" > "Find" > "Find what" and enter "git_shell"
3: Edit the Data value so that path points to the correct location.
In my case I changed:
"C:\DEV\PROG\GIT\git-bash.exe" "--cd=%v."
TO:
"P:\DEV\PROG\GIT\git-bash.exe" "--cd=%v."
Screen shot included below.
Steps if you can't use the reinstall metod.
Use REGEDIT
1/ Open regedit (search it if needed)
2/ Go to 'HKEY_CURRENT_USER/Software/Classes/Directory/Background'
3/ Create new key 'shell'
4/ Create new key 'Git bash here' (or whatever name you want to see in the menu)
5/ Create new key 'command' (must be named command)
At this point point you'll have
'HKEY_CURRENT_USER/Software/Directory/Background/shell/Git bash here/command'
6/ Edit the value of the command key as follow 'pathToGit/git-bash.exe'
Update or open new windows explorer and you'll see it when right clicking.
Image to sum this up :
Reinstall Git and select:
Context menu entries: "Git Bash Here" (and the "Git GUI Here" option)
During the installation. Can't say why it disappeared, but this should bring it back.
Run this script (AddGitToExplorerContextMenu.reg).
You may need to update the location of Git. You can add it
manually through regedit also
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell]
#="Git Bash"
[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell\command]
#="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""
Had the same issue , realized that previously right clicking anywhere or inside the folder the Option would show but now I had to select or highlight the folder and then right_click for the option to show.
Uninstall Git completely and delete the Git folder in program files.
Install Git.
From the Context menu, select "Git Bash" & "Git GUI here" options.
I found what I was looking for was in the left pane, not in the right folder. And still using the right-click.
Press SHIFT+F10. It will appear
After Windows 11 update, it got invisible. I first uninstalled the older version and installed the latest 2.35 version. it was still not visible.
It is still there albeit inside another folder in the context menu that comes with a right click.
By going inside any folder right-click INSIDE that folder, in German OS there is
Shift + F10 combination you have it there like before. Or without this shortcut combination go inside Further option (This last) it is there.
It worked fine when I was using Win 10 ,after upgrading my windows to 11 it stopped working.
I solved my problem by following these simple steps.
Uninstall Git completely on computer
Download it here : https://git-scm.com/download/win
Install it
It works fine now!!!
Once you right click on the folder , click on 'Show More Options'.
Now you should be able to see all the earlier options such as 'Git Bash Here'