Proxmox apt-get update fails - server

When I type in the bash of the Server apt-get update it fails, I don't know why. The error is:
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/buster/InRelease 401 Unauthorized [IP: 2a01:7e0:0:424::249 443]
E: The repository 'https://enterprise.proxmox.com/debian/pve buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

The apt package manager on the fresh Proxmox host is configured to download packages from Enterprise Repository by default. You must have a paid subscription to use this repo. If you don't have paid subscription you should switch to No-Subscription Repository.
Either delete /etc/apt/sources.list.d/pve-enterprise.list file or comment all lines in this file with #.
Create new file /etc/apt/sources.list.d/pve-no-subscription.list with content:
deb http://download.proxmox.com/debian/pve buster pve-no-subscription
Read about Proxmox package repositories here:
https://pve.proxmox.com/wiki/Package_Repositories

I came across this answer when looking for a solution to similar GPG errors when trying to update Proxmox while running the Debug terminal during a fresh install. This is a rather old question, but I haven't found a better place to give a more detailed answer other than the Proxmox forums.
As Moayad Almalat says above, you need to buy an Enterprise subscription or disable that repository and add the pve-no-subscription repository instead.
This is the easiest one-line command to add the no-sub repo (don't forget to remove or disable the enterprise repo though):
echo "deb [trusted=yes] http://download.proxmox.com/debian/pve $(lsb_release -s -c) pve-no-subscription" > /etc/apt/sources.list.d/pve-no-sub-repo.list
Once those changes are made, you need to make sure your GPG Keys for the new repositories are in place:
wget https://enterprise.proxmox.com/debian/proxmox-release-$(lsb_release -s -c).gpg -O /etc/apt/trusted.gpg.d/proxmox-release-$(lsb_release -s -c).gpg
wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
If you still have GPG issues when trying to run apt update, you can make sure the GPG keys have the proper permissions by using:
chmod +r /etc/apt/trusted.gpg.d/proxmox-release-$(lsb_release -s -c).gpg
chmod +r /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
Again, as Moayad Almalat mentioned, you can read most of this on the Proxmox wiki here: https://pve.proxmox.com/wiki/Package_Repositories

Related

How do I provide SSH keys to GitHub Actions so that pip can install from a git repo? [duplicate]

This question already has answers here:
Git error: "Host Key Verification Failed" when connecting to remote repository
(30 answers)
Closed 1 year ago.
I'd like to pip install a library from a private GitHub repository in a GitHub Actions job. I can install it on my computer just fine because I've configured GitHub to accept the SSH key. But how do I give an SSH key to a GitHub Actions runner?
On my computer, this works fine:
python -m pip install "git+ssh://git#github.com/ORG/LIBRARY.git#main#egg=SOMETHING&subdirectory=SOMETHING"
Collecting LIBRARY
Cloning ssh://****#github.com/ORG/LIBRARY.git (to revision main) to /tmp/pip-install-_kw52ce5/LIBRARY_35c4fb5cf6a64e30914beaec4a768bd1
Installing build dependencies ... done
...
Successfully built LIBRARY-0.1.1
I changed the name of the library, organization, and directories for privacy. Documentation for pip installations from GitHub repos are here.
I have tried this guide with this GitHub action with no luck. In GitHub Actions, I get this error message:
Step 15/20 : RUN pip install -r requirements.txt
---> Running in 5ece3eb6572e
Collecting LIBRARY# git+ssh://git#github.com/ORG/LIBRARY.git#main#egg=SOMETHING&subdirectory=SOMETHING
Cloning ssh://****#github.com/ORG/LIBRARY.git (to revision main) to /tmp/pip-install-ohx86p2h/LIBRARY_2972ab1296ce45afa73bbb3c5a036bd1
Running command git clone -q 'ssh://****#github.com/ORG/LIBRARY.git' /tmp/pip-install-ohx86p2h/LIBRARY_2972ab1296ce45afa73bbb3c5a036bd1
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
How do I give an SSH key to a GitHub Actions runner?
I think the "Host key verification failed" points to an issue with the ~/.ssh/known_hosts file. Typically, the first time you connect to a host via ssh you are prompted with something similar to:
The authenticity of host 'domain.com (a.b.c.d)' can't be established.
RSA key fingerprint is XX:XX:...:XX.
Are you sure you want to continue connecting (yes/no)?
When you answer yes, the host key is automatically added to the known_hosts file. You can manually add the host key to the known_hosts file of the user that is running your Github Actions:
Get the host key directly from a github admin or once logged into github.com (more secure - highly suggest).
use ssh-keyscan -H github.com >> ~/.ssh/known_hosts

How to resolve my errors in Mongodb on Linux?

I installed on my linux mogodb and it worked but after about 8 months later I can't remember what happened, and I uninstalled and reinstalled it and it worked. Now it doesn't work when I uninstall it and reinstall it. My command line to uninstall it and like
sudo service mongod stop
sudo apt-get purge mongodb-org *
sudo rm -r / var / log / mongodb
sudo rm -r / var / lib / mongodb.
I followed the following url to install it; https://www.tutorialspoint.com/mongodb/mongodb_quick_guide.htm
My error is when I put "sudo apt-get update", it looks like this
E: Unable to recover http://downloads-distro.mongodb.org/repo/ubuntu-
upstart/dists/dist/InRelease The plain signed file is not valid, what was received is
"NOSPLIT". Perhaps the network requires authentication.
E: The http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist InRelease deposit is not
signed.
N: Updates from such a repository cannot be done securely, and are therefore disabled by
default.
N: See the apt-secure (8) manual pages for creating repositories and user configuration
details.

bower - fatal: unable to connect to github.com

After upgrading ember-cli on my mac (Yosemite 10.10.2)
npm uninstall -g ember-cli
npm cache clean
bower cache clean
npm install -g ember-cli#0.1.12
....
or maybe after Yosemite upgrade to 10.10.2,
or after upgrade my Java to v8-32...
my bower doesnt work anymore.
If I try:
bower list
I get an error:
bower check-new Checking for new versions of the project dependencies..
bower ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/rwjblue/ember-cli-test-loader.git", exit code of #128
Additional error details:
fatal: unable to connect to github.com:
github.com[0: 192.30.252.128]: errno=Operation timed out
But if I execute:
git ls-remote --tags --heads git://github.com/rwjblue/ember-cli-test-loader.git
it works:
git ls-remote --tags --heads git://github.com/rwjblue/ember-cli-test-loader.git
c6006a11515c756d115bb5209103a22c2e9554a0 refs/heads/master
929777f8b5c60db3120712c7328f5debdf74a0cd refs/tags/0.0.1
055d50f770ad333e7ead10ecb04605f951e2435b refs/tags/0.0.2
9defa2c59df38dcc334d6c1cc266075c04c2a4f6 refs/tags/0.0.3
a925b8fc428829ea3599e66eb0e6353726426356 refs/tags/0.0.4
c6006a11515c756d115bb5209103a22c2e9554a0 refs/tags/v0.1.0
Also every git clone git:// or http:// works and I can access 192.30.252.128 over http.
Only in combination with bower it doesnt work.
With npm I have also no problems.
What Im trying was to uninstall and reinstall bower. But this doesnt solve the problem.
Next try:
.bowerrc
with:
{
"directory": "bower_components",
"analytics": false,
"proxy": "",
"https-proxy": ""
}
Next try:
.gitconfig
[url "https://"]
insteadOf = git://
With the result:
Additional error details:
fatal: unable to access 'https://github.com/furf/jquery-ui-touch-punch.git/': Failed to connect to github.com port 443: Operation timed out
Iam also try:
ssh -T git#github.com
to add github.com under known_hosts.
The strange thing is:
ssh -T git#github.com
ssh: connect to host github.com port 22: Operation timed out
Try it again:
ssh -T git#github.com
Hi xxxx! You've successfully authenticated, but GitHub does not provide shell access.
So sometimes it works and sometimes not. A look at https://status.github.com/
shows that everything is fine from github.
But why I get sometimes a timeout?
Maybe a DNS Server lag? Every other connections are fine.
Also a ping is looking fine:
The badest time was
time=100.173 ms
over minutes and I start parallel the bower install command with same timeout as before.... but the ping was going on and only with 100ms.
Im also exit my firewalls with no result.
I have no proxy configurred.
Any idea?
Update 09/02/2014
Im currently in Hamburg and here, the bower install works fine. So it is not a problem of my system installation.
Update 12/02/2014
After being back at home, it also works without any changes.
Strange!
From this npm thread: https://github.com/npm/npm/issues/5257#issuecomment-60441477
Try dumping the following into your .gitconfig
[url "https://"]
insteadOf = git://
[url "https://github.com"]
insteadOf = git#github.com
Since I'm on a Windows machine, I also had to ensure that c:\users\me\.gitconfig and the one on my modified home drive h:\.gitconfig were the same.
Run
git config --global url."https://".insteadOf git://
saves lot of pain specially if one is behind the firewall.
One Solution for Requiring Modules
This solution has not been tested against bower list, however, (like in my situation) you may be impeded to bower installs due to local, environmental policies. Here's what allowed me to leverage Bower -- saving me from a multitude of headaches:
...
"dependencies": {
"angular": "https://code.angularjs.org/1.3.15/angular.js",
"jquery": "https://github.com/jquery/jquery.git#~2.1.4",
"moment": "https://github.com/moment/moment.git",
"underscore": "https://github.com/jashkenas/underscore.git#~1.8.3"
}
...
OR,
bower install https://domain.ext/path/to/asset.ext -S
You may be getting the error, fatal: unable to connect to github.com: while trying to install -- this is because in some environments bower cannot resolve the git:// protocol. However, it will resolve http(s):.
My suggestion:
Search Bower for a package,
Navigate to the git repository,
Copy the https git clone URI,
bower install https://.../author/module.git --save
This will save (--save / -S) the package to your bower.json file with the #~n.n.n notation for the package-version.
Hope this helps you guys as it did I.

Deployment from private github repository

I am new to git and github (I used Subversion before). I can not find a solution how to export master branch only from my private repository to my production server.
I need to prepare an automated solution (called via fabric). I found that git has the archive command but this doesn't work with github (I set up SSH keys):
someuser#ews1:~/sandbox$ git archive --format=tar --remote=git#github.com:someuser/somerepository.git master
Invalid command: 'git-upload-archive 'someuser/somerepository.git''
You appear to be using ssh to clone a git:// URL.
Make sure your core.gitProxy config option and the
GIT_PROXY_COMMAND environment variable are NOT set.
fatal: The remote end hung up unexpectedly
So I will need an another way how to do this. I don't want any meta files from git in the export. When I do clone, I will have all these files in .git directory (what I don't want) and this downloads more data than I really need.
Is there a way how to do this over ssh? Or I have to download the zip over HTTPS only?
I'm not sure I fully understood your question.
I use this command to pull the current master version to my server:
curl -sL --user "user:pass" https://github.com/<organisation>/<repository>/archive/master.zip > master.zip
Does this help?
As I explained in SO answer on downloading GitHub archives from a private repo, after creating a GitHub access token, you can use wget or curl to obtain the desired <version> of your repo (e.g. master, HEAD, commit SHA-1, ...).
Solution with wget:
wget --output-document=<version>.tar.gz \
https://api.github.com/repos/<owner>/<repo>/tarball/<version>?access_token=<OAUTH-TOKEN>
Solution with curl:
curl -L https://api.github.com/repos/<owner>/<repo>/tarball/<version>?access_token=<OAUTH-TOKEN> \
> <version>.tar.gz

Receiving Error Code: 255 when pushing to Mercurial repo from Eclipse Plugin

I am using HgEclipse from here: http://www.javaforge.com/project/HGE
I have created a new repository on my server to test the plugin. I cloned the repository, added some files, committed and attempted to push but received the following error message...
abort: HTTP Error 500: Internal Server Error. Command line:
/home/james/workspace/project:hg -y push http://***#[repository location],
error code: 255
From some Googling I can find that the 255 error is to do with Authentication, but the password is correct, otherwise I wouldn't be able to clone in the first place.
Any help or suggestions would be much appreciated.
Thanks
EDIT:
After updating my system to the latest versions I am now also getting this from the command line when pushing (which was previously working):
abort: HTTP Error 500: Permission denied: .hg/store/data/path-to-file.i
Your webserver can't write into the repository. You can either
change the permissions in the local repo so that the webserver get write permissions there (which means you need to set up write permissions with chmod for all files and directories under (and including) .hg, also you need to set the sticky-bit to all directories)
give the webserver an own repo, which is owned by the server.
Giving the web serve a repo of its own looks like this:
$ sudo bash
# mkdir /srv/repo-base
# chown www-data /srv/repo-base
# cd /srv/repo-base
# su -c "hg clone /path/to/current/repo web-repo-name" www-data
# vi /etc/apache2/sites-available/$SITE_CONFIG_FILE # change the repo path to /srv/repo-base/web-repo-name
# /etc/init.d/apache2 reload
A drawback of this method is that you need to push via http even on the machine with the webserver, since as a normal user you don't have write permissions to the webserver repo.
This answered it for me, although it's a different system set-up: TortoiseHg.
In the Repository Settings -> Server, I set Allow Push to *
This was on a private network so secured behind a firewall.