How to fix message of my Git Bash IDE : Author Identity unknown? - windows-10

I think first should deinstall the Git Bash.And after that download and install again on my Windows 10.Is it need to reinstall the app of Git Bash again?And how to fix quickly this kind of error?
I have not problems with first steps at work with Git Bash.I used git cloned -successfully , git status - again successfully.But when I typed git add . and git committ - m "Upload my first project"; I got Author Identity unknown.

Related

How to disable SSH from GitHub repository and using only HTTPS for push and fetch?

I have created repository on my GitHub account and successfully added my android studio project to it last week
I could push and pull with no issue but suddenly GitHub doesn't allow me to clone repository URL from android studio or push or pull the project
After hours of investigation I understood that a public key for SSH is needed
I even created that with git command lines and copied it in GitHub settings, but still have same problem.
1- Why I could work with GitHub but now I can't?
2- How to disable SSH from GitHub repository and using only HTTPS for push and fetch?
3- What is the best solution for this? I just want to push / pull the project.
** New explanation **
I did what #VonC said but no change on URLs :
By the way, I use Android Studio
I did push then get this error :
Finally I found the solution by #VonC help
I created ssh public key in my bin terminal in windows 10.
I added that to my github acount/settings.
( just need to be checked) I get authorized in bin terminal (windows):
MINGW64 /bin $ ssh -T git#github.com
Enter passphrase for key : XXX
... Hi tahadev! You've successfully
authenticated
Then
I did this command in Android Studio terminal :
"git remote set-url origin git#github.com:tahadev/Native_Form_Android.git"
Then
(By the way it is weird why it shows HTTPS url when setting for SSH)
"git remote -v"
origin https://github.com/tahadev/Native_Form_Android.git (fetch)
origin https://github.com/tahadev/Native_Form_Android.git (push)
Then I did PULL first then PUSH, in some back/force :) I finally could be able to reach my code in git from Android Studio
Thx #VonC
Android Studio terminal code and bin terminal
I find strange that the first push error message mentions "Git#github.com": only git#github.com could work, not Git.
But in any case, if you want to experiment with HTTPS without changing anything, type anywhere:
git config --global url."https://github.com/".insteadOf git#github.com:
Then check again how a push works in VSCode.
To revert:
git config --global --unset-all url.https://github.com/.insteadof
That insteadOf setting would not change a git remote -v output (still SSH there)
If would simply ensure to use an HTTPS URL when doing a git push.

What is wrong with my git 1.8.4.2-1?

I have an old Synology DS-106j server where I tried to install git using ipkg command. The installation went smoothly, but git failed to work correctly. I am currently learning how to use git, so I don't know if it is a bug from git with the version I am using or something else is wrong.
What I did was create a new local repository with a specified name, add a new file, commit it, and got an error:
NAS_SERVER> git init Test
Initialized empty Git repository in /root/Test/.git/
NAS_SERVER> ls
Packages.gz git_1.8.4.2-1_powerpc.ipk
Test
NAS_SERVER> cd Test
NAS_SERVER> git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to track)
NAS_SERVER> touch Test.cs
NAS_SERVER> ls
Test.cs
NAS_SERVER> git add *
NAS_SERVER> git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: Test.cs
#
NAS_SERVER> git commit -m "Test"
fatal: 57e2b8c52efba71d84c56bf6f37581686b9061a3 is not a valid object
I thought...maybe I did something wrong, so I used git on Windows OS and try a push. Still an error. Transfer the whole repository to the server and check the status. It seems fine. Try a commit. Still the same result. What worse is that I can't update git version without having to compile it, which I don't even know how to do so. Any suggestion to what might be wrong?
If your goal is to push into a git repo located on the synology disk(s) for backup purposes I'd recommend a different approach which would avoid having to install a rather old git version on the synology box itself (which could lead to problems if/when using a newer git version on the windows machine).
Export a samba share from synology, mount it on windows and use the windows git to create the backup repo (maybe even a bare repo, eventually group shared if you plan to share work with other people). Then push from your working repo into this backup repo - all on the windows box. In this scenario the synology box doesn't need git installed, it just serves files (i.e. its original job).
I'm using such setup but with a linux machine instead of a windows one and with the bare repo on the synology disks exported via NFS instead of Samba.

ThoughtWorks GO Add Pipeline - Failing to find GIT in PATH

"Failed to find 'git' on your PATH. Please ensure 'git' is executable by the Go Server and on the Go Agents where this material will be used."
I'm getting this when attempting to use GIT when creating a new build pipeline.
I'm not that experienced with Linux to know how to debug this and I can't find anything in the docs or via a google search.
GO was installed as root, so was GIT, the server has been rebooted since and I can run git in bash. "which git" shows that it is in /usr/bin. "export $path" shows that /usr/bin is in the PATH variable.
Can anyone recommend anything else to try?
Thanks.
The Go server and agent runs under user 'go' and therefore you will need to ensure git is in path for this user.
Change the user to go. If you get a prompt for password, put the password of the current logged in user.
$ sudo su - go
Then check if git is in path or simply check for the version
$ which git
$ git --version
If you don't get expected output for the above commands you might have to provide git executables to the user 'go', that is, you will need to add git in this user's PATH. Alternatively, you can provide the path in /etc/default/go-server
export PATH=$PATH:/path/to/git
I recall having this problem too, for me it was related to a local git repository that I did not share with the git daemon. Running the repository with the git daemon solved this problem for me.
URL for me starts with git://localhost, not sure if http will work too

How do I create a Git repo out of dev and live versions of an existing site on my webserver?

Some info:
Running Apache 2.2.3 on CentOS 5.6 64bit (dunno if Apache version is relevant here)
Git is installed
It's a VPS, so I have all the access I need
I have an existing website (located at /home/username/public_html/) and a dev version of the site (at /home/username/dev/) both on the same machine.
I work directly on the dev version (actually working local, but using Sublime Text 2's SFTP plugin to automatically upload on save, so for all intents and purposes, I can be considered to be working directly on the files at /home/username/dev/).
What I would like to do is use Git to push changes from dev to live. Currently I am having to keep track of which files are edited and then FTP or copy them over manually. I want to be able to revert changes if something doesn't go right, things like that.
However, I have never used Git (or any kind of version control) before. I've been googling Git tutorials, but everything I have found assumes something different from my actual setup. The main thing is that most tutorials assume brand new projects. I am terrified of messing up my live site by trying to set up a repo for it.
Anyhow, my question: how can I use my existing folders to create a repo where I can push from /home/username/dev/ to /home/username/public_html/ (or pull vise versa)?
I ended up following this tutorial and it does exactly what I wanted.
Assuming that your live version came from some version of your dev version you could get everything into a git repository with
make a copy of your live code
$ cp -axf /home/username/public_html/ git_repo
putting everything in live under git version control
$ cd git_repo
$ git init
$ git add .
$ git commit -m 'Initial import from live version'
now copy over all files from the dev version and put them on a branch dev in git
$ rm *
$ cp /home/username/dev/* .
$ git checkout -b dev
$ git add .
$ git commit -m 'Initial import from dev version'
After that your live code will be on the master branch in the repository and the dev code in branch dev.
If when you are done you always put everything from dev to live, you could achieve this in git with merging your dev into your master branch (which holds your live code) when you are done.
Your live version could be a clone of that repository from the master branch, and deploying would be just a
$ git pull
there.

Pull not working - TortoiseGIT / Windows 7 / GIT on Debian + gitolite

i have a weird issue. Im using TortoiseGIT (Win7) and my repositories are placed on a vritual server (Debian), where im using gitolite and SSH keys.
I can clone the repository to my PC, i can run Fetch, Push, Commit, Sync .. everything, but when trying to Pull the changes from server Pushed by other contributor, the following error appears:
git.exe pull -v --progress "origin"
fatal: 'pull' appears to be a git command, but we were not
able to execute it. Maybe git-pull is broken?
git did not exit cleanly (exit code 128)
I don't understand, why just the pull command is not working .. thanks for any help.
I can make a clone of the repository, with the contributed changes .. but can not Pull the changes to created repository on my PC.
I encountered this same issue after changing the git Bash executable sh.exe to be always run as administrator (to get round another problem). It then left git unable to access it under certain scenarios and caused various "Maybe git-* is broken?" errors. Perhaps this might help someone...
Uninstalling old Git and reinstalling the latest build fixed this issue for me.
Here's a link to the installers
Link to get installers
My exact error message was
C:\Program Files (x86)\Git/libexec/git-core\git-pull: line 304: exec: git-merge: not found
fatal: 'pull' appears to be a git command, but we were not
able to execute it. Maybe git-pull is broken?
The error message is very much linked to Git, and comes from help.c:
static const char bad_interpreter_advice[] =
N_("'%s' appears to be a git command, but we were not\n"
"able to execute it. Maybe git-%s is broken?");
That is similar to issue 40 (of another GUI, here terminal-ide).
In that case, it was due to the remote Git installation, which was incomplete
(Comments 3 of issue 19)
git-merge was also missing from install, can be fixed with
$> ln -s git git-merge
in system/bin/
The resolution might not be exactly the same in your case, but it could be related to a faulty Git installation.
I see that you're able to run "git fetch". If you can also run "git merge", running the sequence "git fetch" followed by "git merge" will accomplish the same thing as "git pull".
Source:
http://git-scm.com/docs/git-pull

Resources