git clone deletes everything in my project - node.js

I am facing an issue with git.
I was cloning my git repo with git clone
However, i get this error message.
and the project folder is empty.
When i search about this issue online, people suggested git reset
but i got an error saying
error: invalid path 'nodejs/blog_mvc/public /style.css'
fatal: make_cache_entry failed for path 'nodejs/blog_mvc/public /style.css'
I am not getting what this error message is telling me to do.
Cloning into 'WebApps'...
remote: Enumerating objects: 488, done.
remote: Counting objects: 100% (488/488), done.
remote: Compressing objects: 100% (272/272), done.
remote: Total 5294 (delta 201), reused 426 (delta 142), pack-reused 4806
Receiving objects: 100% (5294/5294), 10.40 MiB | 2.91 MiB/s, done.
Resolving deltas: 100% (1361/1361), done.
error: invalid path 'nodejs/blog_mvc/public /style.css'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
and as it suggested, i did git restore --source=HEAD :/
and i got this error.
error: invalid path 'nodejs/blog_mvc/public /style.css'
when i checked git status, everything in the project was deleted.
But on my github account, everything is still there as usual.
Can someone tell me what is going on?
I am not sure if the best solution is rollback to the previous commit and start from there or if i could figure out in a better way, please let me know. that would help me.
Thank you in advance.

Related

"Error decoding the received TLS packet" when cloning into git repository

I am experiencing an error when trying to clone into the https://github.com/zulip/zulip.git repository.
As far as I have looked this question has not been answered yet.
-I have tried raising the http/https buffer without success using:
git config --global http.postBuffer 524288000
git config --global https.postBuffer 524288000
-The error always occurs #53% arround 100MiB in.
Cloning into 'zulip'...
remote: Enumerating objects: 342136, done.
remote: Counting objects: 100% (1589/1589), done.
remote: Compressing objects: 100% (719/719), done.
error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
EDIT:
I have done a bit testing and I seem to be getting this error whenever I try to clone a very large repository.
-I tried cloning the https://github.com/dagster-io/dagster repository and got the same error;
-Then I tried with an old and very small repository of mine (https://github.com/LFBianchi/RPyNCalc) and it works like a charm;
-Just to be sure I forked the github.com/zulip/zulip.git and tried cloning it from my version and got the same exact error.
This was solved by switching to SSH instead of HTTPS.

Using Git with GitHub: `remote: Permission to username\project.git denied to myname.`

I forked an existing project I'm trying to contribute to,
I'm trying to do it the simplest way possible. From a raspberry pi.
I changed email address and project names for simplicity
I don't understand why this doesn't work, the new repository is at https://github.com/username/project
Please help me understand what is missing, the instructions found online for github are not sufficient
pi#raspberrypi:~ $ git config --global user.name "username"
pi#raspberrypi:~ $ git config --global user.email "username#email.com"
pi#raspberrypi:~ $ git clone https://github.com/username/project
Cloning into 'project'...
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 1450 (delta 9), reused 16 (delta 5), pack-reused 1427
Receiving objects: 100% (1450/1450), 2.28 MiB | 0 bytes/s, done.
Resolving deltas: 100% (1019/1019), done.
pi#raspberrypi:~ $ cd project
pi#raspberrypi:~/project $ git add --all
pi#raspberrypi:~/project $ git commit -am "mychange"
[master 1732397] mychange
20 files changed, 2613 insertions(+), 2248 deletions(-)
create mode 100644 newfile.cpp
pi#raspberrypi:~/project $ git push
Username for 'https://github.com': username#email.com
Password for 'https://username#email.com#github.com':
remote: Permission to username/project.git denied to myname.
fatal: unable to access 'https://github.com/username/project/': The request ed URL returned error: 403
The username requested by GitHub should not be an email address. (username#email.com)
It should be your GitHub user account name.
Unless you have 2FA activated, in which case, the username remains your GitHub account, but your password would be a PAT (Personal Access Token)

git push impossible due to unpacker error

can anyone help me please ? I can't push due to :
C:\projects\MadmaqsSF>git push origin dev
Enumerating objects: 2125, done.
Counting objects: 100% (2125/2125), done.
Delta compression using up to 8 threads
Compressing objects: 100% (1473/1473), done.
Writing objects: 100% (2124/2124), 127.61 MiB | 233.35 MiB/s, done.
Total 2124 (delta 539), reused 2047 (delta 494)
remote: error: inflate: data stream error (invalid stored block lengths)
remote: fatal: pack has bad object at offset 43619424: inflate returned -3
error: remote unpack failed: index-pack abnormal exit
To http://midex/moud/MadmaqsSF.git
! [remote rejected] dev -> dev (unpacker error)
error: failed to push some refs to 'http://midex/moud/MadmaqsSF.git'
I think it's about long file name..
I tried:
git push -f origin dev
Its not a permission issue
Finally i just created a new repository and pushed my work on it. I think the old repo was corrupted.

GitHub cloning - unable to access attributes from another linux account

I have a repository on GitHub. I tried to to connect to this repository from my laptop with Debian. I want to connect from one of my linux accounts: php-ocsclient. But I did not succeed.
The strange thing is that the error message said that there was no access to /home/gameboy/.config/git/attributes. Why does it need the access to another account?
I purged git completelly from my laptop an reinstall but this strange thing remained.
php-ocsclient#localhost:~/public_html$ git clone https://github.com/trzczy/php-ocsclient.git
Cloning into 'php-ocsclient'...
remote: Counting objects: 47, done.
remote: Total 47 (delta 0), reused 0 (delta 0), pack-reused 47
Unpacking objects: 100% (47/47), done.
Checking connectivity... done.
warning: unable to access '/home/gameboy/.config/git/attributes': Brak dostępu
php-ocsclient#localhost:~/public_html$
How to fix it?

Why I can NOT redirect standard output/error to log in Linux

I try to redirect both the standard output and error of a simple Linux command as below :
git clone https://git.oschina.net/luzhao/helloworld.git &> log
after it finish I look into the log file :
cat log
Cloning into 'helloworld'...
absolutely , the log is not completed , some output was missed somehow . The completed log should be like this :
git clone https://git.oschina.net/luzhao/helloworld.git
Cloning into 'helloworld'...
remote: Counting objects: 18, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 18 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (18/18), done.
Checking connectivity... done.
anyone can help ? why some output were missed ? I am using Ubuntu14.04 with bash
This is a weirdness of git, the output changes when it's not being sent to a terminal. Pass the --progress option to git.

Resources