Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

push error #1187

Answered by Byron
bckelley asked this question in Q&A
Feb 27, 2021 · 1 comments · 2 replies
Discussion options

EDIT:
Error creating remote: Cmd('git') failed due to: exit code(128)
cmdline: git fetch -v origin
stderr: 'fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.'

THIS IS WHERE I AM AT:

try:
ssh_cmd = 'ssh -i ' + token
for branch in repo.branches:
with repo.git.custom_environment(GIT_SSH_COMMAND=ssh_cmd):
remote = repo.create_remote('origin', url='git@github.com:' + git_config.get_value('user', 'name') + '/' + project_name)
assert repo.remotes.origin.exists()
assert repo.remotes.origin == repo.remotes.origin == repo.remotes['origin']
repo.remotes.origin.fetch()
repo.create_head('master', origin.refs.master).set_tracking_branch(origin.refs.master).checkout()
repo.remotes.origin.push()
except exc.GitCommandError as error:
print(f'Error creating remote: {error}')


I'm getting an error:

repo.remote.origin.push()
Error creating remote: Cmd('git') failed due to: exit code(128)
cmdline: git push --porcelain origin
stderr: 'fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin master

'

any help with this? I'm stuck.

You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
Comment options

you took too long to reply and I just uninstalled this and added a different one. Sorry

Comment options

Byron Mar 2, 2021
Maintainer

I am glad to hear that you found a workaround.

Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /