Tag Archives: git

How to Solve Git Filename too long Error

report errors

Prompt filename too long when git clone code

Solution:

Open the command window with the administrator and enter git config — system core.longpaths true to solve the problem.

git config --system core.longpaths true

error: src refspec master does not match anyerror: failed to push some refs to

When pushing a local project to gitee for the first time, a similar error occurs:

error: src refspec master does not match any
error: failed to push some refs to 'https://gitee.com/xxx/irojects.git'

The solution is to pull first and then push:

git pull origin master

I thought it would be OK to push again, but it’s not:

% git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use

Then you still have to operate like this:

git push -u origin master

Successful push!

Welcome to my official account and exchange study.

Repo reports an error syntax error: invalid syntax

File "/mnt/fileroot/yuhua.lin/p/.repo/repo/main.py", line 79
    file=sys.stderr)
        ^
SyntaxError: invalid syntax

solve

This is because of the version of Python

mkdir -p ~/.bin
PATH="${HOME}/.bin:${PATH}"
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
chmod a+rx ~/.bin/repo

Error in installing RPM: requires Ruby Version > = 2. ** [How to Solve]

 

3 error conditions

Upgrade Ruby

Download GPG public key

gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
or
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import
or
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import (My Choice)

Download RVM and set up environment

curl -L http://get.rvm.io | bash -s stable
source /usr/local/rvm/scripts/rvm

View existing Ruby versions

rvm list known

Upgrade to 2.4.0

rvm install 2.4.0

Install RPM again

gem install fpm

[Solved] Git Push Error: &fatal: the remote end hung up unexpectedly

First of all, this is my error report

Total 123 (delta 0), reused 0 (delta 0), pack-reused 0
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly

Reason: the project is too large and the network is not working, resulting in an error that the download is too slow and exceeds the time trigger

Method 1: modify the cache size

git config --global http.postBuffer 524288000

Change the warehouse configuration to the following

[core]
	
   repositoryformatversion = 0
	
   filemode = false
	
   bare = false
	
   logallrefupdates = true
	
   symlinks = false
	
   ignorecase = true


[remote "origin"]
	
   url = https://github.com/dhsb-4/SSM.git
	
   fetch = +refs/heads/*:refs/remotes/origin/*


[branch "master"]
   remote = origin
   merge = refs/hefs/master

[http]
  postBuffer = 1048576000

Configuration path (open with Notepad)
push again after modification

Method 2: configure the minimum speed and minimum speed time of GIT

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999 

– Global: for the current user – system: for all users

Method 3: use SSH path

I use this method to solve this problem

[Solved] Flutter SDK constraint error: pub get failed (65; See…

Download a file from git, open it, run fluent pub get, and an error occurs:
pubspec.yaml has no lower bound SDK constraint.
you should edit pubspec.yaml to contain an SDK constraint:
environment:
SDK: ‘>= 2.10.0 < 3.0.0 ‘

add to pubspec.yaml:
environment: SDK:’ >= 2.10.0 < 3.0.0 ‘
after rerunning fluent pub get, an error is still reported, indicating that the SDK constraint is not added. Later, it is found that the subfolder example of the home folder also contains a pubspec.yaml file, in which the SDK constraint is not added
after adding constraints, run fluent pub get.