git和ssh上的代理问题 - Arch linux

时间:2016-12-19 06:55:11

标签: linux git ssh proxy archlinux

我最近工作的公司最近从网络中删除了代理。

我无法让git忘记代理。它仍然使用旧的代理设置。

我试过了:

git config --system --unset https.proxy
git config --system --unset http.proxy
git config --global --unset https.proxy
git config --global --unset http.proxy

也尝试了,

git config --global --unset core.gitproxy

输出git config -l <​​/ p>

user.name=my.name
user.email=my.email.address
user.user=my.name
core.autocrlf=input

我正在使用Manjaro Linux(基于Arch Linux)。我从/ etc / environment中删除了代理设置。

唯一有效的方法是做

export https_proxy=""
export http_proxy=""

发出任何git命令之前。

bashrc或/ etc / profile中没有给出代理设置。

我也不能ssh。

浏览器,Maven和其他人都可以正常工作。任何帮助将不胜感激。

2 个答案:

答案 0 :(得分:1)

这个问题一直困扰着我。我觉得在我问它的那一刻,我会找到答案。

原来,Arch Linux for proxy使用了另一个文件,只有少数应用程序使用。此文件中的代理设置不是系统范围的,这就是我在/ etc / environment中删除代理后能够使用浏览器和其他应用程序的原因。

有一个文件

/etc/profile.d/proxy.sh

具有代理设置。删除并重新启动修复了问题。

感谢您的帮助。

答案 1 :(得分:0)

要做的关键是发出Using TensorFlow backend. Traceback (most recent call last): File "DeepNeuralNetwork.py", line 9, in <module> from keras.models import Sequential File "/usr/local/lib/python2.7/dist-packages/keras/__init__.py", line 2, in <module> from . import backend File "/usr/local/lib/python2.7/dist-packages/keras/backend/__init__.py", line 69, in <module> from .tensorflow_backend import * File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 1, in <module> import tensorflow as tf File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 23, in <module> from tensorflow.python import * File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 65, in <module> import tensorflow.contrib as contrib File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/__init__.py", line 28, in <module> from tensorflow.contrib import learn File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/__init__.py", line 72, in <module> from tensorflow.contrib.learn.python.learn import * File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/__init__.py", line 23, in <module> from tensorflow.contrib.learn.python.learn import * File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/__init__.py", line 25, in <module> from tensorflow.contrib.learn.python.learn import estimators File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/__init__.py", line 23, in <module> from tensorflow.contrib.learn.python.learn.estimators.autoencoder import TensorFlowDNNAutoencoder File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/autoencoder.py", line 25, in <module> from tensorflow.contrib.learn.python.learn.estimators.base import TensorFlowBaseTransformer File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 34, in <module> from tensorflow.contrib.learn.python.learn.estimators import estimator File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 38, in <module> from tensorflow.contrib.learn.python.learn.io import data_feeder File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/io/__init__.py", line 22, in <module> from tensorflow.contrib.learn.python.learn.io.dask_io import extract_dask_data File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/io/dask_io.py", line 26, in <module> import dask.dataframe as dd File "/usr/local/lib/python2.7/dist-packages/dask/dataframe/__init__.py", line 5, in <module> from .io import (from_array, from_pandas, from_bcolz, File "/usr/local/lib/python2.7/dist-packages/dask/dataframe/io/__init__.py", line 6, in <module> from .csv import read_csv, to_csv, read_table File "/usr/local/lib/python2.7/dist-packages/dask/dataframe/io/csv.py", line 147, in <module> CPU_COUNT = psutil.cpu_count() AttributeError: 'module' object has no attribute 'cpu_count' (简短版本为git config --list)以查看它是否已配置为git。

如果是,请浏览git config -l~/.gitconfig(在回购邮件中),.git/config$(prefix)/etc/gitconfig$XDG_CONFIG_HOME/git/config以了解配置的位置并删除它

如果不是,正如我猜测$GIT_DIR/config未设置修复它,请通过http_proxy~/.profile~/.bash_profile并删除代理定义条目,此外到~/.pam_environment/etc/environment/etc/profile你说你已经做过。