Getting error when pushing github repsoitory - github-pages

I get this error when pushing a brand new repo, here is the error:
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I have done research but most are out-dated, I have deleted the folder as well but still gives me this error

1st remove the remote origin:
git remote remove origin
Then add a new remote in this format:
git remote add origin https://github.com/username/repo-name.git

Related

Go get errors "could not read from remote repository"

Using "go get", I enter this command:
go get github.com/company/code
The repository is private. The error that comes back says this:
go get: module github.com/company/code: git ls-remote -q origin in /Users/myusername/go/pkg/mod/cache/vcs/d3459c3c5732de488c7de6ddbb96dcbb5d3c220735157c316a37c431326e9181: exit status 128:
fatal: 'git#github.comcompany/code' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Note on the first "fatal" line that the URL location does not have a colon between .com and company. I don't know whether that's significant. If it is significant, I don't know where to go to change it. I'd appreciate any tips!
If I ask git to list the remotes, I get
$git remote -v
origin git#github.com:Company/code.git (fetch)
origin git#github.com:Company/code.git (push)
If I push using git ...
$git push
everything up-to-date
Any ideas? Many thanks for your help.

AWS OpsWorks setup_failed for Instance - unable to deploy_branch

I've had a remote dashboard running fine for a couple of years (written for me by an external developer). It runs on an EC2 instance and is configured using OpsWorks.
Today it's not working, and I see in OpsWorks that the instance is showing as setup_failed.
According to the logs it fails here:
[2021-07-02T15:00:59+00:00] FATAL: Stacktrace dumped to /var/chef/runs/18bc4301-71c1-4393-bb26-eae958791d5a/local-mode-cache/cache/chef-stacktrace.out
[2021-07-02T15:00:59+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2021-07-02T15:00:59+00:00] ERROR: deploy_branch[/srv/api] (iparcelbox::deploy-api line 45) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '255'
---- Begin output of git fetch origin ----
STDOUT:
STDERR: error: cannot open .git/FETCH_HEAD: Permission denied
---- End output of git fetch origin ----
Ran git fetch origin returned 255
I've checked the recipe file for iparcelbox::deploy-api and line 45 calls a deploy_branch:
deploy_branch server_path do
user userName
group groupName
repository node[:iparcelbox][:git_url]
revision node[:iparcelbox][:revision]
enable_submodules false
migrate false
shallow_clone true
git_ssh_wrapper "/tmp/api_git_wrapper.sh"
rollback_on_error false
keep_releases 5
symlink_before_migrate.clear
purge_before_symlink purge_dirs
create_dirs_before_symlink []
symlinks({})
action :deploy
end
So as I understand it, the deploy_branch is trying to fetch a git repo, and for some reason it's failing? I've checked my GitHub repository for the source files and I can see an ssh 'Deploy Key' which is showing as used within the last week.
If anyone could give me any suggestions as to what else to try, it would be much appreciated!
I found an answer to this - I thought the issue was permission denied accessing the git repository, but actually it was because the destination folder on my instance had modified ownership. Setting the ownership back to that specified in the Chef recipe using chown allowed the setup to complete successfully.

Bitbucket cloning into Linux server

I have read: BitBucket: Host key verification failed and Jenkins Host key verification failed and several other links provided. I seem to find myself in an odd situation.
I want to clone my django repo into a digital ocean droplet. I am following the steps of this document. https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04 .
Everything seems to have gone well, until the step where I need to create the django project. I already have a django project and thus don't want to create a new project on the server. I only need to clone it onto the server.
I ran : root#ubuntu-s-1vcpu-2gb-xxx:~#rsync --archive --chown=llewellyn:llewellyn ~/.ssh /home/llewellyn
My bitbucket has the id_rsa SSH key uploaded and it all worked in the past, no new SSH has been generated. And the repo is set to public.
When running:
(myprojectenv) llewellyn#ubuntu-s-1vcpu-2gb-xxx:~/myprojectdir$ git clone git#bitbucket.org:LlewellynHattinghLH/repo.git
Cloning into 'repo'...
Warning: Permanently added the RSA host key for IP address '18.205.xx.x' to the list of known hosts.
git#bitbucket.org: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I have tried several articles, but most only tell me how to create a new SSH.
Any help would greatly be appreciated.
First, you can do:
export GIT_SSH_COMMAND='ssh -Tv'
Then the git clone will be more verbose, giving you more clues as to why it fails.
Second, regarding the permissions:
Your ~/.ssh must be 700, you keys 600: check that with ls -alrth ~/.ssh.
Note: what should be uploaded to your BitBucket is the id_rsa.pub public key, not the id_rsa private key.

Jenkins + TortoiseSVN - Can't connect/integrate

I can't connect Jenkins with TortoiseSVN. I try to connect my Jenkins with my local tortoise, so have no online server.
I used file:///C:/Users/a.simon/SVN/MyRepository to access my local repository, but it doesn't work. And why does Jenkins need Credentials, I don't have any Login in Tortoise:
And if I run that, I get this error:
ERROR: Failed to check out file:///C:/Users/a.simon/SVN/MyRepository
svn: E180001: Unable to open an ra_local session to URL
svn: E180001: Unable to open repository 'file:///C:/Users/a.simon/SVN/MyRepository'
Setup - Tortoise: So this is my SVN-Folder
MyCannonAttack contains the Project
And the repository the repository-stuff
First you need to configure Visual SVN Server and then try it will work.
https://www.visualsvn.com/server

Permission denied. Error code: 3 Error message from server: Permission denied

I am logging into my amazon aws production box using WinSCP and i have successfully setup Tomcat 6. But in webapps folder when i transfer some webservice i get error as:
Permission denied.
Error code: 3
Error message from server: Permission denied
Please help me out to resolve this issue
You haven't mentioned what instance type you are using, but it sounds like you are on some flavor of Linux. You need to chmod or chown the webapps directory so you can place files there, or you can place them elsewhere (like your home directory), then log in and use sudo mv to move it in place.