I have a scenario where multiple github actions job update the same repo or something same file but different lines at the same time. I am getting below errors:
ERROR:__main__:Error occured while pushing the code: Cmd('git') failed due to: exit code(128)
cmdline: git pull -v origin
stderr: 'fatal: Need to specify how to reconcile divergent branches.'
or
WARNING:git.remote:Error lines received while fetching: error: failed to push some refs to 'https://github.com/test-ai/project-stack.git'
ERROR:__main__:Error occured while pushing the code: Cmd('git') failed due to: exit code(1)
cmdline: git push --porcelain origin
stderr: 'error: failed to push some refs to 'https://github.com/test-ai/project-stack.git'
I am using the below code:
from git.repo.base import Repo
repo = Repo.clone_from(git_path, folder_to_clone, branch=branch)
repo.git.add(file_paths)
repo.index.commit(commit_message)
repo.remotes.origin.pull()
origin = repo.remote(name="origin")
push = origin.push()
push.raise_if_error()
Related
I'm trying to add a library for better publishing experience (np).
The issue is, I'm getting this error regardless of what option/version I use:
✖ Command failed with exit code 128: git log --format=%s %h 715331db5d0ebbcda8751b08eaa4f84b213b2ff1
fb769f732b295e9debdfe80fe6a2c4d050a4093e..HEAD
fatal: ambiguous argument '715331db5d0ebbcda8751b08eaa4f84b213b2ff1
fb769f732b295e9debdfe80fe6a2c4d050a4093e..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
I'm not well versed enough with git to understand what this is trying to tell me, plus searches for the error led me to dead ends.
I'm using Github as a source in code build and using webhook (PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED), but when I generate a pull request or update a pull request I want to access the last commit author info ( author name and email )
I'm using command : git log -1 --format="%an <%ae>"
But it will throw an error
[Container] 2022/07/08 18:17:46 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: git log -1 --format="%an <%ae>". Reason: exit status 128
I'm not able to access author info based on the last commit, I thought code build would clone the repo fully and able to access the last commit author info but it seems not
I wrote my program with Laravel and Vuejs and it works fine on the localhost, but it gets an error on the host.
Problem:
The program runs well on local host, but when I put it on the host, the following error is appears:
[vue-router] Failed to resolve async component default:
ChunkLoadError: Loading chunk vendors~demo failed
ChunkLoadError: "Loading chunk vendors~demo failed.
(missing: http://example.com/vendors~demo.js)"
requireEnsure http://example.com/js/manifest.js:127
component webpack-internal:///./resources/js/router.js:56
resolveAsyncComponents webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1904
flatMapComponents webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1931
flatMapComponents webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1931
flatMapComponents webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1930
resolveAsyncComponents webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1866
iterator webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2121
step webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1847
step webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1851
step webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1851
step webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:1848
iterator webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2140
_callee$ webpack-internal:///./resources/js/permission.js:109
What I did:
I assumed that the files might not be properly located on the host, but that was not the problem.
The next possibility was to update Webpack, but that didn't solve the problem.
Where is the problem?
After several attempts, I used the following command to get the compiled js files, which was a mistake. These are good for development purposes.
npm run watch
or
yarn watch
Use the following command to get the output:
npm run prod
I am really struggling to understand the internals of Xcode, the latest error I am getting is this one:
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Strip\ Frameworks /Users/danale/Library/Developer/Xcode/DerivedData/build/Build/Intermediates.noindex/NFIBEngage.build/Debug-iphonesimulator/PROD.build/Script-8CBD27422B744FC9C0407AA3.sh
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/NFIBEngage.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/NFIBEngage.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
How do I go about resolving this? None of what I have seen thus far has worked. The application itself loads just fine inside of simulator, but I keep getting build failures.
I was getting this error when I had React Native 0.53.3 and React 16.2 and I continue to get this error when I upgraded to React Native 0.59.9 and React 16.8.
The PhaseScriptExecution Strip\ Frameworks /appName.build/Debug-iphonesimulator/PROD.build/Script-8CBD27422B744FC9C0407AA3.sh Xcode build error was related to some configuration inside of ios/Pods/Pods.xcodeproj/project.pbxproj where the configuration in those files look something like this:
9B41C3B09EAC07B2B007DE0F /* Strip Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Strip Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "bash \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/InstabugCore.framework/strip-frameworks.sh\"\n";
};
Once I completely removed references to 8CBD27422B744FC9C0407AA3 the error went away.
I have a problem when trying to migrate the subversion repository to Git repository
I run by following command
git svn clone -s --ignore-paths="tags" svn://localhost/web .
and I got the error message as below,
branch_from: /branches/tags => /branches/tags/3.7
Found possible branch point: svn://localhost/web/branches/tags/3.7 => svn://localhost/web/tags/3.7, 15131
Initializing parent: refs/remotes/tags/3.7#15131
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 101, path '/branches/tags/3.7'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
Found possible branch point: svn://localhost/web/branches/workspace_production_3.0 => svn://localhost/web/branches/tags/3.7, 10538
Found branch parent: (refs/remotes/tags/3.7#15131) a7067c8515c17c7f0bf8c6390a785426a8de5b83
Following parent with do_switch
Successfully followed parent
error: 'refs/remotes/tags' exists; cannot create 'refs/remotes/tags/3.7#15131'
fatal: Cannot lock the ref 'refs/remotes/tags/3.7#15131'.
update-ref -m r10539 refs/remotes/tags/3.7#15131 67f3c547c7dfac657fcfd7759746f44eb74b187f: command returned error: 128
actually I don't want to ignore any path, but seem like tags occurs the problem, so I put it to the ignore-path.
Do I missing something?
For my repository, there are the previous revision that contains non-standard repository form like /branches/tags , so, I fixed by re-create git rep with following command
git svn init -s --ignore-paths="^tags|^branches/tags" svn://localhost/web .
git svn fetch